Documentation ¶
Overview ¶
Package factorial represents examples of calculations of factorial (n!). Read more about factorial: https://en.wikipedia.org/wiki/Factorial
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Calculate ¶
func Calculate[T constraints.Integer](x T) T
Calculate calculates factorial in imperative way. This way is much more performing than recursive way.
func Recursive ¶
func Recursive[T constraints.Integer](x T) T
Recursive calculates the factorial in unsigned way.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.