Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

ilo-example-package

Demo package for the ilo package registry.

Install

ilo add ilo-lang/ilo-example-package

Use

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

Functions

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]

Package structure

index.ilo   -- all four functions; imported automatically by `use "ilo-lang/ilo-example-package"`

License

MIT

About

Demo package showing the ilo package registry flow — install with: ilo add ilo-lang/ilo-example-pkg

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors