// Define a list associating names of regular polyhedra with pairs: // [number-of-faces, number-of-sides-per-face] polyhedra = [ ["cube", [6, 4]], ["dodecahedron", [12, 5]], ["icosahedron", [20, 3]], ["octahedron", [8, 3]], ["tetrahedron", [4, 3]] ]; test1() = assoc("octahedron", polyhedra); test(assoc("octahedron", polyhedra), ["octahedron", [8, 3]]); test(assoc("cube", polyhedra), ["cube", [6, 4]]); test(assoc("icosahedron", polyhedra), ["icosahedron", [20, 3]]); test(assoc("tetrahedron", polyhedra), ["tetrahedron", [4, 3]]); test(assoc("dodecahedron", polyhedra), ["dodecahedron", [12, 5]]); test(assoc("megahedron", polyhedra), []);