[{"name":"Atoms","comment":" This module provides a custom type representing chemical elements and a record type for store informations about them.\n\n\n# Types\n\n@docs AtomInfo, Atom\n\n# Data\n\n@docs PeriodicTableInfo, periodicTable\n\n\n# Creation\n\n@docs create\n\n\n# Query\n\n@docs get, filter\n\n\n\n","unions":[{"name":"Atom","comment":" A Custom type representing all 118 atoms (as of 2024) in the periodic table.\n","args":[],"cases":[["H",[]],["He",[]],["Li",[]],["Be",[]],["B",[]],["C",[]],["N",[]],["O",[]],["F",[]],["Ne",[]],["Na",[]],["Mg",[]],["Al",[]],["Si",[]],["P",[]],["S",[]],["Cl",[]],["Ar",[]],["K",[]],["Ca",[]],["Sc",[]],["Ti",[]],["V",[]],["Cr",[]],["Mn",[]],["Fe",[]],["Co",[]],["Ni",[]],["Cu",[]],["Zn",[]],["Ga",[]],["Ge",[]],["As",[]],["Se",[]],["Br",[]],["Kr",[]],["Rb",[]],["Sr",[]],["Y",[]],["Zr",[]],["Nb",[]],["Mo",[]],["Tc",[]],["Ru",[]],["Rh",[]],["Pd",[]],["Ag",[]],["Cd",[]],["In",[]],["Sn",[]],["Sb",[]],["Te",[]],["I",[]],["Xe",[]],["Cs",[]],["Ba",[]],["La",[]],["Ce",[]],["Pr",[]],["Nd",[]],["Pm",[]],["Sm",[]],["Eu",[]],["Gd",[]],["Tb",[]],["Dy",[]],["Ho",[]],["Er",[]],["Tm",[]],["Yb",[]],["Lu",[]],["Hf",[]],["Ta",[]],["W",[]],["Re",[]],["Os",[]],["Ir",[]],["Pt",[]],["Au",[]],["Hg",[]],["Tl",[]],["Pb",[]],["Bi",[]],["Po",[]],["At",[]],["Rn",[]],["Fr",[]],["Ra",[]],["Ac",[]],["Th",[]],["Pa",[]],["U",[]],["Np",[]],["Pu",[]],["Am",[]],["Cm",[]],["Bk",[]],["Cf",[]],["Es",[]],["Fm",[]],["Md",[]],["No",[]],["Lr",[]],["Rf",[]],["Db",[]],["Sg",[]],["Bh",[]],["Hs",[]],["Mt",[]],["Ds",[]],["Rg",[]],["Cn",[]],["Nh",[]],["Fl",[]],["Mc",[]],["Lv",[]],["Ts",[]],["Og",[]]]}],"aliases":[{"name":"AtomInfo","comment":" A Record type alias containing some information about all 118 atoms (as of 2024) in the periodic table. The names of atom in US English are used as the record key.\n\n    periodicTable.hydrogen.atomicNumber --> 1\n\n    periodicTable.carbon.atomicNumber --> 6\n\n","args":["a"],"type":"{ hydrogen : a, helium : a, lithium : a, beryllium : a, boron : a, carbon : a, nitrogen : a, oxygen : a, fluorine : a, neon : a, sodium : a, magnesium : a, aluminum : a, silicon : a, phosphorus : a, sulfur : a, chlorine : a, argon : a, potassium : a, calcium : a, scandium : a, titanium : a, vanadium : a, chromium : a, manganese : a, iron : a, cobalt : a, nickel : a, copper : a, zinc : a, gallium : a, germanium : a, arsenic : a, selenium : a, bromine : a, krypton : a, rubidium : a, strontium : a, yttrium : a, zirconium : a, niobium : a, molybdenum : a, technetium : a, ruthenium : a, rhodium : a, palladium : a, silver : a, cadmium : a, indium : a, tin : a, antimony : a, tellurium : a, iodine : a, xenon : a, cesium : a, barium : a, lanthanum : a, cerium : a, praseodymium : a, neodymium : a, promethium : a, samarium : a, europium : a, gadolinium : a, terbium : a, dysprosium : a, holmium : a, erbium : a, thulium : a, ytterbium : a, lutetium : a, hafnium : a, tantalum : a, tungsten : a, rhenium : a, osmium : a, iridium : a, platinum : a, gold : a, mercury : a, thallium : a, lead : a, bismuth : a, polonium : a, astatine : a, radon : a, francium : a, radium : a, actinium : a, thorium : a, protactinium : a, uranium : a, neptunium : a, plutonium : a, americium : a, curium : a, berkelium : a, californium : a, einsteinium : a, fermium : a, mendelevium : a, nobelium : a, lawrencium : a, rutherfordium : a, dubnium : a, seaborgium : a, bohrium : a, hassium : a, meitnerium : a, darmstadtium : a, roentgenium : a, copernicium : a, nihonium : a, flerovium : a, moscovium : a, livermorium : a, tennessine : a, oganesson : a }"},{"name":"PeriodicTableInfo","comment":" A record type containing minimal informations for each atoms in the periodic table.\n","args":[],"type":"{ atomicNumber : Basics.Int, period : Basics.Int, group : Basics.Int, symbol : String.String, name : String.String }"}],"values":[{"name":"create","comment":" Returns new `AtomInfo` having specified informations.\n\n    type Metality\n        = Metal\n        | NonMetal\n\n    metality : AtomInfo Metality\n    metality =\n        create\n            (\\atom ->\n                let\n                    { period, group } =\n                        get atom periodicTable\n                in\n                if\n                    (period == 1)\n                        || (period <= 6)\n                                && (group >= 10 + period)\n                then\n                    NonMetal\n                else\n                    Metal\n            )\n\n    get Xe metality --> NonMetal\n\n    get U metality --> Metal\n    \n","type":"(Atoms.Atom -> a) -> Atoms.AtomInfo a"},{"name":"filter","comment":" Returns list of atoms that passed a test ordered with ascending atomic number.\n\n    first10Atoms : List Atom\n    first10Atoms =\n        filter (\\a -> a.atomicNumber <= 10) periodicTable -->\n            [ H\n            , He\n            , Li\n            , Be\n            , B\n            , C\n            , N\n            , O\n            , F\n            , Ne\n            ]\n\n","type":"(a -> Basics.Bool) -> Atoms.AtomInfo a -> List.List Atoms.Atom"},{"name":"get","comment":" Returns value of an atom stored in the second argument. You also can directly access record like `atoms.hydrogen`, which has a better performance in return for a bit more keyboad typing.\n\n    calcium : PeriodicTableInfo\n    calcium = get Ca periodicTable\n\n    calcium.period --> 4\n\n    calcium.group --> 2\n\n","type":"Atoms.Atom -> Atoms.AtomInfo a -> a"},{"name":"periodicTable","comment":" An `Atoms`record containing `PeriodicTableInfo` of the all 118 atoms.\n\n    periodicTable.sodium -->\n        { atomicNumber = 11\n        , period = 3\n        , group = 1\n        , symbol = \"Na\"\n        , name = \"sodium\"\n        }\n\n","type":"Atoms.AtomInfo Atoms.PeriodicTableInfo"}],"binops":[]}]