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