From 00e2c70b01f28c9b00ec3d5096895a387676774d Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 26 Aug 2016 00:46:55 +0200 Subject: Linking C functions --- examples/fac.fusp | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 examples/fac.fusp (limited to 'examples') diff --git a/examples/fac.fusp b/examples/fac.fusp new file mode 100644 index 0000000..38643d5 --- /dev/null +++ b/examples/fac.fusp @@ -0,0 +1,7 @@ +mul a b = code mul a b; +sub a b = code sub a b; + +fac 0 = 1; +fac n = mul n (fac (sub 1 n)); + +main = fac 5; -- cgit v1.2.3