Recursively Defined Mapping/Examples/Factorial

From ProofWiki
Jump to navigation Jump to search

Example of Recursively Defined Mapping

The facorial of a positive integer $n$ can be defined recursively as:

$\map f n = \begin {cases} 0 & : n = 1 \\ n \map f {n - 1} & : n > 1 \end {cases}$


Sources