aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2024-04-20 08:32:04 +0100
committerJuan J. Martinez <jjm@usebox.net>2024-04-20 08:32:04 +0100
commitecac79e7d4e83ce728b5eff2a8111f4be50b1d1e (patch)
tree1ad763480f55aca281d7768d4deee526fbd87f2b
parent044360219f2e4e0b5b5a95cb7ede00753340d61d (diff)
downloadfunco-ecac79e7d4e83ce728b5eff2a8111f4be50b1d1e.tar.gz
funco-ecac79e7d4e83ce728b5eff2a8111f4be50b1d1e.zip
Added modulo operator
-rw-r--r--README.md2
-rwxr-xr-xfunco1
2 files changed, 2 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8815658..a6d6214 100644
--- a/README.md
+++ b/README.md
@@ -67,7 +67,7 @@ Literals include:
Operators are functions, that includes:
-* `+`, `-`, `*`, `/`
+* `+`, `-`, `*`, `/`, `mod`
* `>`, `<`, `>=`, `<=`, `=`, `!=`
* `and`, `or`, `not`
diff --git a/funco b/funco
index c1983d6..542980a 100755
--- a/funco
+++ b/funco
@@ -285,6 +285,7 @@ def default_env():
"-": operator.sub,
"*": operator.mul,
"/": operator.truediv,
+ "mod": operator.mod,
">": operator.gt,
"<": operator.lt,
">=": operator.ge,