Merged with upstream. Updated M (aka MUMPS) detection to use the new bayesian / samples method.

This commit is contained in:
Laurent Parenteau
2013-03-14 11:33:09 -04:00
472 changed files with 179182 additions and 1762 deletions

19
samples/M/functions.m Normal file
View File

@@ -0,0 +1,19 @@
; This function computes a factorial
factorial(n) ;;
new f
set f=n
for do quit:n'>1
. set n=n-1
. set f=f*n
. write n," : ",f,!
quit f
main() ;;
set x=5
set y=$$factorial(x)
write "Factorial of ",x," = ",y,!
quit