Compare commits
2 Commits
8c8f555d83
...
92a1ee9010
Author | SHA1 | Date | |
---|---|---|---|
|
92a1ee9010 | ||
|
9a3217b2c9 |
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@ludus/ludus-js-pure",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ludus/ludus-js-pure",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"license": "GPL-3.0",
|
||||
"devDependencies": {
|
||||
"shadow-cljs": "^2.26.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@ludus/ludus-js-pure",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"description": "A Ludus interpreter in a pure JS function.",
|
||||
"type": "module",
|
||||
"main": "build/ludus.mjs",
|
||||
|
|
|
@ -879,7 +879,7 @@ fn atan/2 {
|
|||
|
||||
fn mod {
|
||||
"Returns the modulus of num and div. Truncates towards negative infinity."
|
||||
(num as :number, y as :number) -> base :mod (num, div)
|
||||
(num as :number, div as :number) -> base :mod (num, div)
|
||||
}
|
||||
|
||||
fn square {
|
||||
|
|
|
@ -221,6 +221,12 @@
|
|||
|
||||
(defn store! [b x] (set (b :^value) x))
|
||||
|
||||
(defn mod [x y]
|
||||
(print "mod!")
|
||||
(pp x)
|
||||
(pp y)
|
||||
(% x y))
|
||||
|
||||
(def ctx {
|
||||
"print!" print!
|
||||
"prn" prn
|
||||
|
@ -232,7 +238,7 @@
|
|||
"sub" -
|
||||
"mult" *
|
||||
"div" /
|
||||
"mod" %
|
||||
"mod" mod
|
||||
"gt" >
|
||||
"gte" >=
|
||||
"lt" <
|
||||
|
|
|
@ -56,14 +56,5 @@
|
|||
# (comment
|
||||
(do
|
||||
(-> (ludus `
|
||||
penup! ()
|
||||
let s = turtle_state ()
|
||||
pendown! ()
|
||||
forward! (100)
|
||||
rt! (0.25)
|
||||
fd! (100)
|
||||
load_turtle_state! (s)
|
||||
pendown! ()
|
||||
lt! (0.25)
|
||||
fd! (50)
|
||||
doc! (mod)
|
||||
`)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user