on master help sign in
Use a shorter name for Native.List in the List module
commit39b3fcb034c3ebb1b7ee442cbfb35033d9e5f72c authorevancz <info@elm-lang.org> dateSun 3 Mar 2013, 07:55 (14 years ago) parent965162e
1 file changed+22−22
core/List.elm+22−22
core/List.elm+22−22
@@ -1,64 +1,64 @@
11
22module List where
33
4−import Native.List
4+import Native.List as L
55
66head : [a] -> a
7−head = Native.List.head
7+head = L.head
88
99tail : [a] -> [a]
10−tail = Native.List.tail
10+tail = L.tail
1111
1212last : [a] -> a
13−last = Native.List.last
13+last = L.last
1414
1515map : (a -> b) -> [a] -> [b]
16−map = Native.List.map
16+map = L.map
1717
1818foldl : (a -> b -> b) -> b -> [a] -> b
19−foldl = Native.List.foldl
19+foldl = L.foldl
2020
2121foldr : (a -> b -> b) -> b -> [a] -> b
22−foldr = Native.List.foldr
22+foldr = L.foldr
2323
2424foldl1 : (a -> a -> a) -> [a] -> a
25−foldl1 = Native.List.foldl1
25+foldl1 = L.foldl1
2626
2727foldr1 : (a -> a -> a) -> [a] -> a
28−foldr1 = Native.List.foldr1
28+foldr1 = L.foldr1
2929
3030scanl : (a -> b -> b) -> b -> [a] -> [b]
31−scanl = Native.List.scanl
31+scanl = L.scanl
3232
3333scanl1 : (a -> a -> a) -> [a] -> [a]
34−scanl1 = Native.List.scanl1
34+scanl1 = L.scanl1
3535
3636filter : (a -> Bool) -> [a] -> [a]
37−filter = Native.List.filter
37+filter = L.filter
3838
3939length : [a] -> Int
40−length = Native.List.length
40+length = L.length
4141
4242reverse : [a] -> [a]
43−reverse = Native.List.reverse
43+reverse = L.reverse
4444
4545concat : [[a]] -> [a]
46−concat = Native.List.foldr (++) []
46+concat = L.foldr (++) []
4747
4848concatMap : (a -> [b]) -> [a] -> [b]
49−concatMap f = concat . Native.List.map f
49+concatMap f = concat . L.map f
5050
5151all : (a -> Bool) -> [a] -> Bool
52−all pred = Native.List.all
52+all pred = L.all
5353
5454any : (a -> Bool) -> [a] -> Bool
55−any = Native.List.any
55+any = L.any
5656
5757and : [Bool] -> Bool
58−and = Native.List.all id
58+and = L.all id
5959
6060or : [Bool] -> Bool
61−or = Native.List.any id
61+or = L.any id
6262
6363sum = foldl (+) 0
6464product = foldl (*) 1
@@ -73,10 +73,10 @@ partition pred lst =
7373 if pred x then (x::bs,cs) else (bs,x::cs)
7474
7575zipWith : (a -> b -> c) -> [a] -> [b] -> [c]
76−zipWith = Native.List.zipWith
76+zipWith = L.zipWith
7777
7878zip : [a] -> [b] -> [(a,b)]
79−zip = Native.List.zip
79+zip = L.zip
8080
8181unzip : [(a,b)] -> ([a],[b])
8282unzip pairs =