Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- interleave_list :: [a] -> [a] -> [a]
- monotone_prefix :: Ord a => (a -> a) -> a -> [a]
- interleave2 :: [[a]] -> [a]
- shift :: Int -> [a] -> [a]
- selections :: [a] -> [(a, [a])]
- twice_selections :: [a] -> [(a, a, [a])]
- permutations :: [a] -> [[a]]
Documentation
interleave_list :: [a] -> [a] -> [a] Source #
monotone_prefix :: Ord a => (a -> a) -> a -> [a] Source #
computes iterates of the given function while they are monotone. https://en.wikipedia.org/wiki/Monotonic_function
interleave2 :: [[a]] -> [a] Source #
shift :: Int -> [a] -> [a] Source #
shift rotates the first k elements (and leaves the rest of the list intact)
selections :: [a] -> [(a, [a])] Source #
From discussion in Haskell-Cafe mailing list by Koen Claessen: https://mail.haskell.org/pipermail/haskell-cafe/2002-June/003122.html
twice_selections :: [a] -> [(a, a, [a])] Source #
permutations :: [a] -> [[a]] Source #
From discussion in Haskell-Cafe mailing list by Koen Claessen: https://mail.haskell.org/pipermail/haskell-cafe/2002-June/003122.html
Orphan instances
InterleaveFunctor List Source # | |
interleave :: [a] -> [a] -> [a] Source # |