Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Defines core functions that augment the prelude.
Synopsis
- updateSTRef :: STRef s a -> (a -> a) -> ST s ()
- rref :: STRef s a -> ST s a
- wref :: STRef s a -> a -> ST s ()
- uref :: STRef s a -> (a -> a) -> ST s ()
- findSucc :: (a -> Bool) -> [a] -> Maybe a
- insertBefore :: (a -> Bool) -> a -> [a] -> [a]
- removeFirst :: (a -> Bool) -> [a] -> [a]
- textExtract :: Text -> Text -> Text -> Maybe Text
- textBlank :: Int -> Text
- textReadDec :: Text -> Maybe Int
Documentation
updateSTRef :: STRef s a -> (a -> a) -> ST s () Source #
Updates an STRef by applying a function to its value.
findSucc :: (a -> Bool) -> [a] -> Maybe a Source #
Finds the element in a list that is the succeessor of the element matching a predicate.
insertBefore :: (a -> Bool) -> a -> [a] -> [a] Source #
Inserts an element in a list before the element satisfied by a predicate.
removeFirst :: (a -> Bool) -> [a] -> [a] Source #
Removes the first item from a list that satisfies a predicate.