on master help sign in
Add two type annotations.
commit04b521ab493f18610272dc1cd8bbe3e83ac3becc authorevancz <info@elm-lang.org> dateSat 9 Feb 2013, 20:36 (14 years ago) parent5349b40
1 file changed+3
core-elm/List.elm+3
core-elm/List.elm+3
@@ -24,7 +24,10 @@ foldl1 f (x::xs) = foldl f x xs
2424foldr1 : (a -> a -> a) -> [a] -> a
2525foldr1 f (x::xs) = foldr f x xs
2626
27+scanl : (a -> b -> b) -> b -> [a] -> [b]
2728scanl f b xs = b :: (case xs of { x::xs -> scanl f (f x b) xs; [] -> [] })
29+
30+scanl1 : (a -> a -> a) -> [a] -> [a]
2831scanl1 f lst = case lst of { x::xs -> scanl f x xs; [] -> [] }
2932
3033filter : (a -> Bool) -> [a] -> [a]