mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
18 lines
381 B
Plaintext
18 lines
381 B
Plaintext
import "path/to/library.hyc";
|
|
|
|
// user defined function
|
|
func foo :: (a, b) -> Bool = {
|
|
return a == b;
|
|
};
|
|
|
|
// entry point
|
|
func main :: () -> Int = {
|
|
// if else in variable definition
|
|
let cond_str :: String = if foo(1, 1) { return "t" } else { return "f" };
|
|
|
|
// Infix operator
|
|
let n :: Bool = 2 == 2;
|
|
// Prefix operator
|
|
let m :: Bool = !n;
|
|
puts(m);
|
|
}; |