Define List.and and List.or
commit0bd875923f71d643ce8d13ed05b5c47d0b31f4e9
authorEvan Czaplicki <info@elm-lang.org>
dateThu 8 Aug 2013, 16:20 (13 years ago)
parent6237418
libraries/List.elm+2−2
@@ -91,11 +91,11 @@ any = Native.List.any
9191
9292-- Check to see if all elements are True.
9393and : [Bool] -> Bool
94−and = Native.List.and
94+and = foldl (&&) True
9595
9696-- Check to see if any elements are True.
9797or : [Bool] -> Bool
98−or = Native.List.or
98+or = foldl (||) False
9999
100100-- Concatenate a list of appendable things:
101101--