AtomScript

Tiny Code, Big Reactions!

Define your atoms.
React them with a reaction and produce a new molecule.

atom sodium = "Na";
atom chlorine = "Cl";
reaction getSalt(metal, halogen) { produce metal + halogen; }
molecule salt = getSalt(sodium, chlorine);
salt

Perfrom arithmetic operations.

1 + 1
2
100-31
69
21 * 20
420

Complex molecules (Data Structures)
Arrays, Objects

molecule elements = [1, 2, 3, 4, 5, 6, 7];
molecule result = { "temperature" : "300", "pressure" : "1atm" }

Closures!

atom baseWeight = 30;
reaction getWeight(weight) { produce weight + baseWeight; }

Try now