RosettaCodeData/Task/Compile-time-calculation/M4/compile-time-calculation-1.m4

7 lines
125 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
define(`factorial',
`ifelse($1, 0, 1, `eval($1 * factorial(eval($1 - 1)))')')dnl
dnl
BEGIN {
print "10! is factorial(10)"
}