Safe Haskell | None |
---|---|

Language | Haskell2010 |

- diff :: Num a => [a] -> [a]
- zipTail :: (a -> a -> c) -> [a] -> [c]
- integ :: Int -> [Int] -> [Int]
- trace :: String -> a -> a
- trace' :: Show a => String -> a -> a
- trace1 :: Show b => String -> b -> a -> a
- trace1' :: (Show a, Show b) => String -> b -> a -> a
- popping :: MonadState s m => Int -> Lens' s [a] -> ([a] -> m b) -> m b
- popping' :: MonadState s m => Int -> Lens' s [a] -> ([a] -> m b) -> m (Maybe b)
- popping1 :: MonadState s m => Lens' s [a] -> (a -> m b) -> m (Maybe b)
- wrapSucc :: (Bounded a, Enum a, Eq a) => a -> a
- wrapPred :: (Bounded a, Enum a, Eq a) => a -> a
- mutating :: MonadState s m => Lens' s a -> (a -> a) -> m (a, a)
- maybe' :: Maybe a -> b -> (a -> b) -> b
- median :: Integral a => [a] -> Maybe a
- normalize :: (Num a, Ord a) => [a] -> [a]
- pitchClassSet :: Int -> [Int] -> [Int]
- lfsr :: Int -> Int -> Int -> [Bool]
- rehMarks :: [String]
- rotate :: Int -> [a] -> [a]
- rotations :: [a] -> [[a]]
- allTuples :: Int -> [a] -> [[a]]
- monotonic :: [Int] -> Bool
- interleave :: [[a]] -> [a]
- pivot :: [[a]] -> [[a]]
- filterOnKeys :: Ord a => [a] -> Map a b -> Map a b
- pairBy :: (a -> b) -> [a] -> [(a, b)]
- delim :: String -> [String] -> String

# Documentation

trace1' :: (Show a, Show b) => String -> b -> a -> a Source #

trace with extra variable and output of result.

popping :: MonadState s m => Int -> Lens' s [a] -> ([a] -> m b) -> m b Source #

pop items off a stateful list, use for monadic function.

popping' :: MonadState s m => Int -> Lens' s [a] -> ([a] -> m b) -> m (Maybe b) Source #

`popping`

but only runs function if popped items are non-empty

popping1 :: MonadState s m => Lens' s [a] -> (a -> m b) -> m (Maybe b) Source #

popping with only head

mutating :: MonadState s m => Lens' s a -> (a -> a) -> m (a, a) Source #

do monadic `over`

-- '(%=)' -- with pass-through of (before,after)

interleave :: [[a]] -> [a] Source #