Add test if_func_branch

This commit is contained in:
Théophile Bastian 2018-02-16 00:59:39 +01:00
parent faa31d90dd
commit ca790364b6
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,2 @@
1
1

View 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