From e48017a6c2c9b7c3d989d660a1561f1ebb415878 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sun, 10 Dec 2023 15:15:47 -0800 Subject: Add more nxs functions --- doc/main.nxs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/main.nxs b/doc/main.nxs index 7967dbc..cddb7f3 100644 --- a/doc/main.nxs +++ b/doc/main.nxs @@ -1,8 +1,18 @@ (include "fib.nxs") (include "../stdlib/math.nxs") -(print (fib 7)) -(print (+ (factorial 5) 10)) +(print (fib 8)) +(print (factorial 5)) +(print (+(factorial 4) 8)) -(exp 3) -(print (quote (+ (3 2) 4))) +(bind x (lambda (y) (if (<= y 0) y (x (print (- y 1)))))) + +(x 5) + +(print (exp (/ 1.0 2.0))) +(print (sin 1.0)) +(print (cos 1.0)) +(print (tan 1.0)) +(print (sinh 1.0)) +(print (sin pi)) +(print (ln (exp 1.0))) -- cgit