Skip to content

Commit 6092778

Browse files
committed
example: Fix the list example and add a new example
1 parent a7f47f2 commit 6092778

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/listfilter.pics

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ filter :: (xs=[], pred) =
55
when xs {
66
is [] -> []
77
is x:rest ->
8-
if pred(x) { x:filter(rest, pred) }
9-
else { filter(rest, pred) }
8+
if pred(x) do { x:filter(rest, pred) }
9+
else do { filter(rest, pred) }
1010
}
1111

1212
nums := [1,2,3,4]

0 commit comments

Comments
 (0)