app

Safe Haskell Safe
Language Haskell2010

Nat

Description

This module defines functions to deal with Word16 |

Synopsis

Documentation

type Nat = Word16 #

intToClampedNat :: Int -> Nat #

Transforms an Int into a Natural. Returns 0 if the input Int is negative.

natLength :: [a] -> Nat #

negate :: Nat -> Int #

Negate a natural. The returned value is less or equal to 0.

minusNatClamped :: Nat -> Nat -> Nat #

minusNatClamped n m returns n - m if n >= m, otherwise it returns 0.