on master help sign in
Use a shorter name for Native.List in the List module
39b3fcbevancz
core/List.elm+22−22
@@ -1,64 +1,64 @@
1
1
2module List where
2module List where
3
3
4−import Native.List
4+import Native.List as L
5
5
6head : [a] -> a
6head : [a] -> a
7−head = Native.List.head
7+head = L.head
8
8
9tail : [a] -> [a]
9tail : [a] -> [a]
10−tail = Native.List.tail
10+tail = L.tail
11
11
12last : [a] -> a
12last : [a] -> a
13−last = Native.List.last
13+last = L.last
14
14
15map : (a -> b) -> [a] -> [b]
15map : (a -> b) -> [a] -> [b]
16−map = Native.List.map
16+map = L.map
17
17
18foldl : (a -> b -> b) -> b -> [a] -> b
18foldl : (a -> b -> b) -> b -> [a] -> b
19−foldl = Native.List.foldl
19+foldl = L.foldl
20
20
21foldr : (a -> b -> b) -> b -> [a] -> b
21foldr : (a -> b -> b) -> b -> [a] -> b
22−foldr = Native.List.foldr
22+foldr = L.foldr
23
23
24foldl1 : (a -> a -> a) -> [a] -> a
24foldl1 : (a -> a -> a) -> [a] -> a
25−foldl1 = Native.List.foldl1
25+foldl1 = L.foldl1
26
26
27foldr1 : (a -> a -> a) -> [a] -> a
27foldr1 : (a -> a -> a) -> [a] -> a
28−foldr1 = Native.List.foldr1
28+foldr1 = L.foldr1
29
29
30scanl : (a -> b -> b) -> b -> [a] -> [b]
30scanl : (a -> b -> b) -> b -> [a] -> [b]
31−scanl = Native.List.scanl
31+scanl = L.scanl
32
32
33scanl1 : (a -> a -> a) -> [a] -> [a]
33scanl1 : (a -> a -> a) -> [a] -> [a]
34−scanl1 = Native.List.scanl1
34+scanl1 = L.scanl1
35
35
36filter : (a -> Bool) -> [a] -> [a]
36filter : (a -> Bool) -> [a] -> [a]
37−filter = Native.List.filter
37+filter = L.filter
38
38
39length : [a] -> Int
39length : [a] -> Int
40−length = Native.List.length
40+length = L.length
41
41
42reverse : [a] -> [a]
42reverse : [a] -> [a]
43−reverse = Native.List.reverse
43+reverse = L.reverse
44
44
45concat : [[a]] -> [a]
45concat : [[a]] -> [a]
46−concat = Native.List.foldr (++) []
46+concat = L.foldr (++) []
47
47
48concatMap : (a -> [b]) -> [a] -> [b]
48concatMap : (a -> [b]) -> [a] -> [b]
49−concatMap f = concat . Native.List.map f
49+concatMap f = concat . L.map f
50
50
51all : (a -> Bool) -> [a] -> Bool
51all : (a -> Bool) -> [a] -> Bool
52−all pred = Native.List.all
52+all pred = L.all
53
53
54any : (a -> Bool) -> [a] -> Bool
54any : (a -> Bool) -> [a] -> Bool
55−any = Native.List.any
55+any = L.any
56
56
57and : [Bool] -> Bool
57and : [Bool] -> Bool
58−and = Native.List.all id
58+and = L.all id
59
59
60or : [Bool] -> Bool
60or : [Bool] -> Bool
61−or = Native.List.any id
61+or = L.any id
62
62
63sum = foldl (+) 0
63sum = foldl (+) 0
64product = foldl (*) 1
64product = foldl (*) 1
@@ -73,10 +73,10 @@ partition pred lst =
73 if pred x then (x::bs,cs) else (bs,x::cs)
73 if pred x then (x::bs,cs) else (bs,x::cs)
74
74
75zipWith : (a -> b -> c) -> [a] -> [b] -> [c]
75zipWith : (a -> b -> c) -> [a] -> [b] -> [c]
76−zipWith = Native.List.zipWith
76+zipWith = L.zipWith
77
77
78zip : [a] -> [b] -> [(a,b)]
78zip : [a] -> [b] -> [(a,b)]
79−zip = Native.List.zip
79+zip = L.zip
80
80
81unzip : [(a,b)] -> ([a],[b])
81unzip : [(a,b)] -> ([a],[b])
82unzip pairs =
82unzip pairs =