Merge branch 'feature/list-where' of git://github.com/zeckalpha/wren into zeckalpha-feature/list-where

Conflicts:
	builtin/core.wren
	src/wren_core.c
This commit is contained in:
Bob Nystrom
2014-02-15 11:21:24 -08:00
3 changed files with 27 additions and 3 deletions
+8
View File
@@ -0,0 +1,8 @@
var a = [1, 2, 3]
var moreThan1 = fn (x) { return x > 1 }
var moreThan10 = fn (x) { return x > 10 }
var b = a.where(moreThan1)
var c = a.where(moreThan10)
IO.print(b) // expect: [2, 3]
IO.print(c) // expect: []