1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-09-28 09:17:41 +00:00
bobbylisp/example/hello_world.hyc

16 lines
313 B
Plaintext
Raw Normal View History

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