@@ -1,7 +1,7 @@
2module Maybe where
2module Maybe where
4−import List (foldr)
4+import List as List
6-- The Maybe datatype. Useful when a computation may or may not
6-- The Maybe datatype. Useful when a computation may or may not
7-- result in a value (e.g. logarithm is defined only for positive numbers).
7-- result in a value (e.g. logarithm is defined only for positive numbers).
@@ -30,4 +30,4 @@ cons mx xs = maybe xs (\x -> x :: xs) mx
31-- Filters out Nothings and extracts the remaining values.
31-- Filters out Nothings and extracts the remaining values.
32justs : [Maybe a] -> [a]
32justs : [Maybe a] -> [a]
33−justs = foldr cons []
33+justs = List.foldr cons []