RosettaCodeData/Task/Factorial/Pure/factorial-1.pure

4 lines
89 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
fact n = n*fact (n-1) if n>0;
= 1 otherwise;
let facts = map fact (1..10); facts;