# Documentation

class Eq a => Countable a whereSource

countPrevious :: a -> Maybe aSource

countMaybeNext :: Maybe a -> Maybe aSource

Countable Bool | |

Countable Int8 | |

Countable Int16 | |

Countable Int32 | |

Countable Int64 | |

Countable Integer | |

Countable Word8 | |

Countable Word16 | |

Countable Word32 | |

Countable Word64 | |

Countable () | |

Countable Nothing | |

Countable a => Countable [a] | |

Countable a => Countable (Maybe a) | |

(Finite a, Countable b) => Countable (a -> b) | |

(Countable a, Countable b) => Countable (Either a b) | |

(Countable a, Countable b) => Countable (a, b) |

maybeRecount :: (Countable a, Countable b) => a -> Maybe bSource

countDownUp :: (Countable down, Countable up) => (down, up) -> Maybe (down, up)Source

countUpDown :: (Countable up, Countable down) => (up, down) -> Maybe (up, down)Source

finalIteration :: (a -> Maybe a) -> a -> aSource

class Countable a => AtLeastOneCountable a whereSource

countFirst :: aSource

class AtLeastOneCountable a => InfiniteCountable a whereSource

InfiniteCountable Integer | |

AtLeastOneCountable a => InfiniteCountable [a] | |

InfiniteCountable a => InfiniteCountable (Maybe a) | |

(Finite a, AtLeastOneCountable a, InfiniteCountable b) => InfiniteCountable (a -> b) | |

(Countable a, InfiniteCountable b) => InfiniteCountable (Either a b) | |

(AtLeastOneCountable a, InfiniteCountable b) => InfiniteCountable (a, b) |

recount :: (Countable a, InfiniteCountable b) => a -> bSource