/samples/closure/while1.ooc
http://github.com/nddrylliog/oc · Unknown · 13 lines · 10 code · 3 blank · 0 comment · 0 complexity · 1e5a0a6f2b85d1cba9bd07107f96b848 MD5 · raw file
- printf: extern func
- while0: func (cond: Func -> Bool, block: Func) {
- cond() ifTrue(||
- block()
- while0(cond, block)
- )
- }
- while0(|| 1, ||
- printf("%s\n", "Hi there!")
- )