init
This commit is contained in:
commit
34e45e702f
16 changed files with 1109 additions and 0 deletions
17
examples/main.jkl
Normal file
17
examples/main.jkl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
//! Module-level documentation
|
||||
|
||||
open std::io;
|
||||
|
||||
Result<T, E> ::= Ok (T) | Err (E);
|
||||
|
||||
/// This just logs a thing
|
||||
log := fn(data ::= Display) {
|
||||
io::println("[info] {}", data);
|
||||
};
|
||||
|
||||
// we need a main function
|
||||
pub main := fn() -> () {
|
||||
io::println("Hello, world");
|
||||
data := [ 1, 2, 3 ];
|
||||
strings := data.map(Display::fmt).collect::<List<...>();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue