Permalink
Browse files

preludez

  • Loading branch information...
1 parent 9a632d3 commit ea9043b1041cff739898d1c5b30eea1cbcce8897 Johan Gustafsson committed May 18, 2010
Showing with 13 additions and 2 deletions.
  1. +13 −2 hs/Prelude.hs
View
@@ -47,8 +47,11 @@ foldr1 f xs = case xs of
filter _ [] = []
filter f (x:xs ) | f x = x : filter f xs
| otherwise = filter f xs
+
+iterate f x = f x : iterate f (f x)
-iterate f x = f x : iterate f x
+zipWith f (a:as) (b:bs) = f a b : zipWith f as bs
+zipWith _ _ _ = []
head xs = case xs of
(x:_) -> x
@@ -75,6 +78,14 @@ data Int = I# Int#
(>) (I# i1) (I# i2) = i1 ># i2
+(<) (I# i1) (I# i2) = i1 <# i2
+
+(<=) (I# i1) (I# i2) = i1 <=# i2
+
+(>=) (I# i1) (I# i2) = i1 >=# i2
+
+(%) (I# i1) (I# i2) = I# (remInt# i1 i2)
+
stepDebug = stepDebug#
data Maybe a = Just a | Nothing
@@ -133,4 +144,4 @@ enumFromThen e1 e2 = enumHelper (e2-e1) (const False) e1
enumFromTo e1 e3 = enumHelper 1 (>e3) e1
-enumFromThenTo e1 e2 e3 = enumHelper (e2-e1) (>e3) e1
+enumFromThenTo e1 e2 e3 = enumHelper (e2-e1) (>e3) e1

0 comments on commit ea9043b

Please sign in to comment.