RosettaCodeData/Task/Short-circuit-evaluation/ArkScript/short-circuit-evaluation.ark

18 lines
405 B
Text
Raw Permalink Normal View History

2025-08-11 18:05:26 -07:00
(let a (fun (v) {
(print "a(" v ")")
v }))
(let b (fun (v) {
(print "b(" v ")")
v }))
(print "---") (and (a true) (b true))
(print "---") (and (a false) (b true))
(print "---") (and (a true) (b false))
(print "---") (and (a false) (b false))
(print "---") (or (a true) (b true))
(print "---") (or (a false) (b true))
(print "---") (or (a true) (b false))
(print "---") (or (a false) (b false))