mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
21 lines
346 B
Plaintext
21 lines
346 B
Plaintext
fun succ x = do
|
|
let one = 1
|
|
let y = x + one in y
|
|
end
|
|
|
|
fun double x = x * 2
|
|
|
|
fun main = do
|
|
let add = \x y -> x + y in
|
|
succ(34)
|
|
|> \x -> add(34, x)
|
|
|> \x -> println(x)
|
|
|
|
let result = add(34, 35)
|
|
println(result)
|
|
end
|
|
|
|
fun main = do
|
|
let add = \x y -> x + y in
|
|
print(add(34, succ(34)))
|
|
end |