2024-12-11 22:22:37 +00:00
|
|
|
& base :print! ("Hello from Prelude")
|
2024-12-10 21:44:52 +00:00
|
|
|
|
2024-12-11 22:22:37 +00:00
|
|
|
& I can't figure out why I need this, but I do
|
|
|
|
& Otherwise the validator won't close over `base`
|
|
|
|
let base = base
|
2024-12-10 21:44:52 +00:00
|
|
|
|
2024-12-11 22:22:37 +00:00
|
|
|
fn add (x as :number, y as :number) -> base :add (x, y)
|
|
|
|
|
|
|
|
fn dec (n as :number) -> base :sub (n, 1)
|
|
|
|
|
|
|
|
fn sub (x as :number, y as :number) -> base :sub (x, y)
|
|
|
|
|
2024-12-13 00:28:55 +00:00
|
|
|
fn print!(x) -> base :print! (x)
|
2024-12-13 00:01:51 +00:00
|
|
|
|
2024-12-13 00:28:55 +00:00
|
|
|
#{add, dec, sub, print!}
|