16 lines
373 B
Plaintext
16 lines
373 B
Plaintext
& base :print! ("Hello from Prelude")
|
|
|
|
& I can't figure out why I need this, but I do
|
|
& Otherwise the validator won't close over `base`
|
|
let base = base
|
|
|
|
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)
|
|
|
|
fn panics! () -> add ("foo", "bar")
|
|
|
|
#{add, dec, sub, panics!}
|