tao-example-1.0.0: Example usage of the tao package.

Safe HaskellSafe
LanguageHaskell2010

Tao.Example.List

Documentation

type family Take (n :: Nat) (xs :: [k]) where ... Source #

Equations

Take _ '[] = '[] 
Take 0 _ = '[] 
Take i (x ': xs) = x ': Take (i - 1) xs 

type family Drop (n :: Nat) (xs :: [k]) where ... Source #

Equations

Drop _ '[] = '[] 
Drop 0 xs = xs 
Drop i (_ ': xs) = Drop (i - 1) xs 

type family Chunk (n :: Nat) (xs :: [k]) where ... Source #

Equations

Chunk _ '[] = '[] 
Chunk 0 _ = '[] 
Chunk s xs = Take s xs ': Chunk s (Drop s xs)