From 42696cdb053d994eacfc66bb348b0ddf0d80046c Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Fri, 17 Feb 2023 21:07:35 -0800 Subject: added update() function, added multiply() function to stdlib --- stdlib/math.pcdt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 stdlib/math.pcdt (limited to 'stdlib') diff --git a/stdlib/math.pcdt b/stdlib/math.pcdt new file mode 100644 index 0000000..078045d --- /dev/null +++ b/stdlib/math.pcdt @@ -0,0 +1,12 @@ +store( + ( + store(0; last;) + if(not(eq(arg0() 1;)) + ( + update(multiply(sub(arg0() 1;) arg1()) last;) + ) + ) + sum(arg1() last()) + ) + multiply; +) -- cgit v1.3.1