Files
wren/test/list/forall.wren
T

10 lines
196 B
Plaintext
Raw Normal View History

2015-01-13 23:47:01 -08:00
var a = [1, 2, 3]
var b = a.forall {|x| x > 1 }
IO.print(b) // expect: false
var d = a.forall {|x| x > 0 }
IO.print(d) // expect: true
2015-01-14 22:42:15 -08:00
var e = [].forall {|x| false }
IO.print(e) // expect: true