- (?!) :: [a] -> Int -> Maybe a
- intersectEnd :: Ord a => [a] -> [a] -> [a]
- intersectFront :: Ord a => [a] -> [a] -> [a]
- delay :: Int -> [a] -> [Int]
- listIndex :: [a] -> [Int]
- pairPred :: [a] -> [(a, Int)]
- different :: Ord a => [a] -> [a] -> [a]
- unlessNull :: [a] -> IO () -> IO ()
- has :: [a] -> Bool
- headM :: Monad m => m [a] -> m a
- lastM :: Monad m => m [a] -> m a
- concatM :: Monad m => m [a] -> m [a] -> m [a]
- replaceAt :: Int -> [a] -> a -> [a]
- splitWith :: (a -> Bool) -> [a] -> [[a]]
- concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
- findM :: Monad m => (a -> m Bool) -> [a] -> m (Maybe a)
- apply2M :: Monad m => [a] -> (a -> m b) -> (a -> m c) -> m [(b, c)]
- apply2 :: [a] -> (a -> b) -> (a -> c) -> [(b, c)]
- partitionM :: Monad m => (a -> m Bool) -> [a] -> m ([a], [a])
- findNext :: (a -> Bool) -> [a] -> Maybe a
- findNextCycle :: (a -> Bool) -> [a] -> Maybe a
- findPrevCycle :: (a -> Bool) -> [a] -> Maybe a
- deleteAt :: Int -> [a] -> [a]
- getLast :: [a] -> Maybe a
- getFirst :: [a] -> Maybe a
- zipWithIndex :: [a] -> (a -> Int -> c) -> [c]
- zipWithIndexM :: Monad m => [a] -> (a -> Int -> m c) -> m [c]
- zipWithIndexM_ :: Monad m => [a] -> (a -> Int -> m c) -> m ()
- addMap :: ([a] -> [a]) -> [[a]] -> [a]
- insertUnique :: Ord a => a -> [a] -> [a]

# Documentation

intersectEnd :: Ord a => [a] -> [a] -> [a]Source

Intersect element with list from end, don't including front or middle element. Return null if haven't intersection element.

intersectFront :: Ord a => [a] -> [a] -> [a]Source

Intersect element with list from front, don't including end or middle element. Return null if haven't intersection element.

different :: Ord a => [a] -> [a] -> [a]Source

Different two list, and two lists must have same length. otherwise throw a error.

concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]Source

concatMapM.

findM :: Monad m => (a -> m Bool) -> [a] -> m (Maybe a)Source

Like find, but works with monadic computation instead of pure function. In expression `find FUNCTION list`, if FUNCTION is IO Bool, you can use `findM FUNCTION list` to instead.

apply2M :: Monad m => [a] -> (a -> m b) -> (a -> m c) -> m [(b, c)]Source

Apply two monad function with list. And return new monad tuples list.

apply2 :: [a] -> (a -> b) -> (a -> c) -> [(b, c)]Source

Apply two function with list. And return new tuples list.

partitionM :: Monad m => (a -> m Bool) -> [a] -> m ([a], [a])Source

Partition list.

findNextCycle :: (a -> Bool) -> [a] -> Maybe aSource

Find next cycle.

findPrevCycle :: (a -> Bool) -> [a] -> Maybe aSource

Find previous cycle.

zipWithIndex :: [a] -> (a -> Int -> c) -> [c]Source

Zip with list index.

zipWithIndexM :: Monad m => [a] -> (a -> Int -> m c) -> m [c]Source

Zip with list index.

zipWithIndexM_ :: Monad m => [a] -> (a -> Int -> m c) -> m ()Source

Zip with list index.

insertUnique :: Ord a => a -> [a] -> [a]Source

Like `insert`

but just insert unique element.