on master help sign in
Get List and Maybe compiling with the Basics module
commit4e1f79c2d509066e6ebece93c540bd3dceef7d36 authorEvan Czaplicki <info@elm-lang.org> dateThu 25 Jul 2013, 23:55 (13 years ago) parent7968fa5
2 files changed+4−3
libraries/List.elm+3−3 libraries/Maybe.elm+1
libraries/List.elm+3−3
@@ -1,7 +1,7 @@
11
22module List where
33
4−import Native.Utils
4+import open Basics
55import Native.List as Native
66
77-- Add an element to the front of a list `(1 :: [2,3] == [1,2,3])`
@@ -119,11 +119,11 @@ product = foldl (*) 1
119119
120120-- Find the maximum element in a non-empty list: `maximum [1,4,2] == 4`
121121maximum : [comparable] -> comparable
122−maximum = foldl1 Native.Utils.max
122+maximum = foldl1 max
123123
124124-- Find the minimum element in a non-empty list: `minimum [3,2,1] == 1`
125125minimum : [comparable] -> comparable
126−minimum = foldl1 Native.Utils.min
126+minimum = foldl1 min
127127
128128-- Split a list based on the predicate.
129129partition : (a -> Bool) -> [a] -> ([a],[a])
libraries/Maybe.elm+1
@@ -1,6 +1,7 @@
11
22module Maybe where
33
4+import open Basics
45import List as List
56
67-- The Maybe datatype. Useful when a computation may or may not