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

16 lines
333 B
Plaintext
Raw Normal View History

2022-02-12 07:17:13 -06:00
// user defined function
2022-02-12 07:37:28 -06:00
func foo :: (a, b) -> Bool = {
return a == b;
2022-02-12 05:29:10 -06:00
};
2022-02-12 05:51:43 -06:00
2022-02-12 07:17:13 -06:00
// entry point
2022-02-12 07:37:28 -06:00
func main :: () -> Int = {
2022-02-12 07:17:13 -06:00
// if else in variable definition
let cond_str :: String = if true { return "t" } else { return "f" };
2022-02-12 07:21:42 -06:00
// Infix operator
let n :: Bool = 2 == 2;
2022-02-12 07:33:33 -06:00
// Prefix operator
let m :: Bool = !n;
2022-02-12 07:17:13 -06:00
};