tao-example-1.0.0: Example usage of the tao package.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Tao.Example.List

Documentation

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

Equations

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

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

Equations

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

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

Equations

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