Skip to content

Commit b399927

Browse files
committed
Merge pull request #196 from tpetricek/master
List.filter should not reverse list
2 parents c517ad0 + fd08afc commit b399927

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/FunScript/Core/list.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ let Get xs n =
176176
FindIndexed (fun i _ -> n = i) xs
177177

178178
let Filter f xs =
179-
Fold (fun acc x ->
179+
FoldBack (fun x acc ->
180180
if f x then Cons(x,acc)
181-
else acc) Nil xs
181+
else acc) xs Nil
182182

183183
let Partition f xs =
184184
Fold (fun (lacc, racc) x ->

0 commit comments

Comments
 (0)