Files
wren/test/list/where.wren
Bob Nystrom f8a9d7f321 Make Sequence base class.
This lets us share functionality between List and Range (and
other user-defined sequence types).
2014-02-16 09:20:31 -08:00

7 lines
136 B
Plaintext

var a = [1, 2, 3]
var b = a.where(fn (x) x > 1)
IO.print(b) // expect: [2, 3]
var c = a.where(fn (x) x > 10)
IO.print(c) // expect: []