Safe Haskell | None |
---|
- class Empty f where
- empty :: f a
- class Cons f where
- cons :: a -> f a -> f a
- class View f where
- class Singleton f where
- singleton :: a -> f a
- class Append f where
- append :: f a -> f a -> f a
- class Functor f => Zip f where
- zipWith :: (a -> b -> c) -> f a -> f b -> f c
- zip :: Zip f => f a -> f b -> f (a, b)
- class Repeat f where
- repeat :: a -> f a
- class Sort f where
- sort :: (Ord a, Sort f) => f a -> f a
- class Reverse f where
- reverse :: f a -> f a
- class Show f where
- class Arbitrary f where
Documentation
class Functor f => Zip f whereSource
It must hold:
fmap f xs = zipWith (\x _ -> f x) xs xs = zipWith (\_ x -> f x) xs xs
Create a container with as many copies as possible of a given value.
That is, for a container with fixed size n
,
the call repeat x
will generate a container with n
copies of x
.