| Safe Haskell | Safe-Inferred |
|---|
Penny.Lincoln.Serial
- data Serial
- forward :: Serial -> Int
- backward :: Serial -> Int
- serialItems :: (Serial -> a -> b) -> [a] -> [b]
- serialSomeItems :: (a -> Either b (Serial -> b)) -> [a] -> [b]
- serialNestedItems :: Traversable f => (a -> Either b (f c, Serial -> c -> d, f d -> b)) -> [a] -> [b]
Documentation
serialItems :: (Serial -> a -> b) -> [a] -> [b]Source
serialSomeItems :: (a -> Either b (Serial -> b)) -> [a] -> [b]Source
Arguments
| :: Traversable f | |
| => (a -> Either b (f c, Serial -> c -> d, f d -> b)) | When applied to each item, this function returns Left if the item does not need a serial, or Right if it has items that need serials. In the Right is the container with items that need serials, the function that applies serials to each item, and a function to re-wrap the container with the serialed items. |
| -> [a] | |
| -> [b] |
Adds serials to items that are nested within other items.