Skip to content

Commit

Permalink
Merge pull request #42 from nomeata/master
Browse files Browse the repository at this point in the history
iterate id and zipWith/repeat rules (Closes #41)
  • Loading branch information
ndmitchell committed Apr 15, 2014
2 parents 9e951ca + 9c8bbda commit e4e3462
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/Default.hs
Expand Up @@ -156,6 +156,9 @@ error "Take on a non-positive" = take i x ==> [] where _ = isNegZero i
error "Drop on a non-positive" = drop i x ==> x where _ = isNegZero i
error = last (scanl f z x) ==> foldl f z x
error = head (scanr f z x) ==> foldr f z x
error = iterate id = repeat
error = zipWith f (repeat x) = map (f x)
error = zipWith f xs (repeat y) = map (\x -> f x y)

-- BY

Expand Down

0 comments on commit e4e3462

Please sign in to comment.