Modules and the fratm library
chiamm { a, b } da "module" imports (import … from) and mann for exports (export), like JavaScript modules. The playground runs a single file, so imports from other files work with the CLI and with Vite.
chiamm { … } da "fratm" uses the FratmScript library, which works everywhere, here too: a_caso(min, max), uno_a_caso(list), mischia(list), quanti(thing), arrotonda(n, digits), ripeti(times, f) and aspetta(ms).
chiamm { quanti, arrotonda, ripeti } da "fratm"
stamm a dì(quanti(["a", "b", "c"]), quanti("pizza"))
stamm a dì(arrotonda(3.14159, 2))
ripeti(2, giro => stamm a dì("Giro", giro))
Output
3 5
3.14
Giro 0
Giro 1