Add test if_func_branch
This commit is contained in:
parent
faa31d90dd
commit
ca790364b6
2 changed files with 10 additions and 0 deletions
2
src/tests/if_func_branch.exp
Normal file
2
src/tests/if_func_branch.exp
Normal file
|
@ -0,0 +1,2 @@
|
|||
1
|
||||
1
|
8
src/tests/if_func_branch.lambda
Normal file
8
src/tests/if_func_branch.lambda
Normal file
|
@ -0,0 +1,8 @@
|
|||
let succeed = fun x -> print 1 in
|
||||
let fail = fun x -> print 0 in
|
||||
|
||||
let true = fun x -> 0 in
|
||||
let false = fun x -> 1 in
|
||||
|
||||
let nothing = ifzero true 0 then succeed 0 else fail 0 in
|
||||
ifzero false 0 then fail 0 else succeed 0
|
Loading…
Reference in a new issue