Demo package for the ilo package registry.
ilo add ilo-lang/ilo-example-package
use "ilo-lang/ilo-example-package" [greet shout safe-div clamp]
main>_
prnt greet "world" -- hello, world
prnt shout "quiet" -- QUIET
r = safe-div 10 2
?r{ok(v):prnt str v;err(e):prnt e} -- 5
prnt str clamp 15 0 10 -- 10
| Name | Signature | Description |
|---|---|---|
greet |
name:t > t |
Prepend "hello, " to a name |
shout |
text:t > t |
Uppercase via upr |
safe-div |
a:n b:n > R n t |
Divide with zero-guard, returns Result |
clamp |
x:n lo:n hi:n > n |
Constrain a number to [lo, hi] |
index.ilo -- all four functions; imported automatically by `use "ilo-lang/ilo-example-package"`
MIT