diff --git a/prelude.ld b/prelude.ld index 77aec1f..48d7f1d 100644 --- a/prelude.ld +++ b/prelude.ld @@ -261,7 +261,7 @@ fn map { fn filter { "Takes a list and a predicate function, and returns a new list with only the items that produce truthy values when the function is called on them. E.g., `filter ([1, 2, 3, 4], odd?) &=> [1, 3]`. Also works on sets." (p? as :fn) -> filter(p?, _) - (p? as :fn, xs as list) -> { + (p? as :fn, xs as :list) -> { fn filterer (filtered, x) -> if p? (x) then append (filtered, x) else filtered