RosettaCodeData/Task/Factorial/FunL/factorial-4.funl
2023-07-01 13:44:08 -04:00

3 lines
111 B
Text

def factorial( n )
| n >= 0 = product( 1..n )
| otherwise = error( 'factorial: n should be non-negative' )