mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2026-01-25 13:07:13 +00:00
debug
This commit is contained in:
parent
582ad5668e
commit
0d62ae0814
29 changed files with 99479 additions and 1166 deletions
15
tests/lambdas.lang
Normal file
15
tests/lambdas.lang
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
decl test_lambdas : Unit -> Unit
|
||||
def test_lambdas = {
|
||||
const lambda1 = \x -> x * x
|
||||
// const lambda2 = \(x : #Hash) -> x.hash // ??
|
||||
const lambda3 = \x y -> x + y
|
||||
|
||||
// TODO: type LambdaType = Int -> Int // ?? type keyword ??
|
||||
// const typed_lambda = \x -> x + 1
|
||||
|
||||
const lambda4 = \x -> {
|
||||
; IO.print x
|
||||
const y = x + x
|
||||
return y
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue