on master help sign in
get rid of documentation for functions that are not exported
44057afEvan Czaplicki
libraries/Either.elm−12
@@ -52,28 +52,16 @@ have the equivalence: `(partition es == (lefts es, rights es))`
52partition : [Either a b] -> ([a],[b])
52partition : [Either a b] -> ([a],[b])
53partition es = List.foldr consEither ([],[]) es
53partition es = List.foldr consEither ([],[]) es
54
54
55−{-| If `Left`, add the value to the front of the list.
56−If `Right`, return the list unchanged
57−-}
58−consLeft : Either a b -> [a] -> [a]
59consLeft e vs =
55consLeft e vs =
60 case e of
56 case e of
61 Left v -> v::vs
57 Left v -> v::vs
62 Right _ -> vs
58 Right _ -> vs
63
59
64−{-| If `Right`, add the value to the front of the list.
65−If `Left`, return the list unchanged.
66−-}
67−consRight : Either a b -> [b] -> [b]
68consRight e vs =
60consRight e vs =
69 case e of
61 case e of
70 Left _ -> vs
62 Left _ -> vs
71 Right v -> v::vs
63 Right v -> v::vs
72
64
73−{-| If `Left`, add the value to the left list.
74−If `Right`, add the value to the right list.
75−-}
76−consEither : Either a b -> ([a], [b]) -> ([a], [b])
77consEither e (ls,rs) =
65consEither e (ls,rs) =
78 case e of
66 case e of
79 Left l -> (l::ls,rs)
67 Left l -> (l::ls,rs)
libraries/Maybe.elm−5
@@ -39,11 +39,6 @@ isJust = maybe False (\_ -> True)
39isNothing : Maybe a -> Bool
39isNothing : Maybe a -> Bool
40isNothing = not . isJust
40isNothing = not . isJust
41
41
42−
43−{-| If `Just`, adds the value to the front of the list.
44−If `Nothing`, list is unchanged.
45−-}
46−cons : Maybe a -> [a] -> [a]
47cons mx xs = maybe xs (\x -> x :: xs) mx
42cons mx xs = maybe xs (\x -> x :: xs) mx
48
43
49{-| Filters out Nothings and extracts the remaining values.
44{-| Filters out Nothings and extracts the remaining values.