Copyright | (c) Hans Hoglund 2012-2014 |
---|---|

License | BSD-style |

Maintainer | hans@hanshoglund.se |

Stability | experimental |

Portability | non-portable (TF,GNTD) |

Safe Haskell | None |

Language | Haskell2010 |

- showRatio :: (Integral a, Show a) => Ratio a -> String
- list :: r -> ([a] -> r) -> [a] -> r
- single :: Prism' [a] a
- inspecting :: Eq a => (b -> a) -> b -> b -> Bool
- inspectingBy :: (b -> a) -> (a -> a -> Bool) -> b -> b -> Bool
- withPrevNext :: [a] -> [(Maybe a, a, Maybe a)]
- rotate :: Int -> [a] -> [a]
- tripped :: Iso ((a, b), c) ((d, e), f) (a, b, c) (d, e, f)
- through :: Applicative f => Lens' s a -> Lens s t a b -> Lens (f s) (f t) (f a) (f b)
- uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
- partial :: (a -> Bool) -> a -> Maybe a
- partial2 :: (a -> b -> Bool) -> a -> b -> Maybe b
- partial3 :: (a -> b -> c -> Bool) -> a -> b -> c -> Maybe c
- _zipList :: Iso [a] [b] (ZipList a) (ZipList b)
- dependingOn :: Lens s t (x, a) (x, b) -> (x -> Lens a b c d) -> Lens s t c d

# Documentation

showRatio :: (Integral a, Show a) => Ratio a -> String Source

Nicer printing of ratio as ordinary fractions. > category: Math > depends: base

inspecting :: Eq a => (b -> a) -> b -> b -> Bool Source

inspectingBy :: (b -> a) -> (a -> a -> Bool) -> b -> b -> Bool Source

withPrevNext :: [a] -> [(Maybe a, a, Maybe a)] Source

rotate :: Int -> [a] -> [a] Source

Rotate a list.

rotate n xs == id iff (n `mod` length xs) == 0 rotate (-n) . rotate n == id

dependingOn :: Lens s t (x, a) (x, b) -> (x -> Lens a b c d) -> Lens s t c d Source