Make Sequence base class.
This lets us share functionality between List and Range (and other user-defined sequence types).
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
var a = 1..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: []
|
||||
Reference in New Issue
Block a user