Compare commits

..

No commits in common. "ef4a345da6482c1e0b98679142817a75e4f736ab" and "2ae5f7929ab19da8ea40a9c4393bf6020aebfa5d" have entirely different histories.

3 changed files with 6 additions and 3 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@ludus/ludus-js-pure",
"version": "0.1.18",
"version": "0.1.17",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@ludus/ludus-js-pure",
"version": "0.1.18",
"version": "0.1.17",
"license": "GPL-3.0",
"devDependencies": {
"shadow-cljs": "^2.26.0",

View File

@ -1,6 +1,6 @@
{
"name": "@ludus/ludus-js-pure",
"version": "0.1.18",
"version": "0.1.17",
"description": "A Ludus interpreter in a pure JS function.",
"type": "module",
"main": "build/ludus.mjs",

View File

@ -374,8 +374,11 @@ fn strip {
fn words {
"Takes a string and returns a list of the words in the string. Strips all whitespace."
(str as :string) -> {
print! (str)
let no_punct = strip (str)
print! (no_punct)
let strs = split (no_punct, " ")
print! (strs)
fn worder (list, str) -> if empty? (str)
then do list > report!
else do append (list, str) > report!