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