1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-10-16 02:37:40 -05:00
bobbylisp/example/ex.hades

17 lines
319 B
Plaintext
Raw Normal View History

2022-03-06 09:15:07 -06:00
-- Variables
let foo: Int = 1;
let bar: String = "bar";
2022-02-17 19:41:05 -06:00
2022-03-06 09:15:07 -06:00
-- Functions
fun add (lhs: Int) (rhs: Int): Int = lhs + rhs;
fun add_2 (lhs: Int) (rhs: Int): Int = do
let a: Int = lhs + rhs;
let b: Int = a + lhs;
2022-03-06 11:20:18 -06:00
return b;
end;
-- Entry point (maybe)
fun main: Void = do
print(add(34, 35));
return 0;
end;