diff options
Diffstat (limited to 'lib/ur')
-rw-r--r-- | lib/ur/list.ur | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ur/list.ur b/lib/ur/list.ur index f3bb0587..eac5ab0c 100644 --- a/lib/ur/list.ur +++ b/lib/ur/list.ur @@ -439,8 +439,8 @@ fun span [a] (f:(a -> bool)) (ls:list a) : list a * list a = let fun span' f acc ls = case ls of - [] => (acc, []) - | x :: xs => if (f x) then span' f (x :: acc) xs else (acc, ls) + [] => (rev acc, []) + | x :: xs => if (f x) then span' f (x :: acc) xs else (rev acc, ls) in span' f [] ls end |