Compare commits

..

2 Commits

Author SHA1 Message Date
Scott Richmond
ef4a345da6 remove print!s from words 2024-06-17 13:12:26 -04:00
Scott Richmond
2203601770 0.1.18 2024-06-17 13:07:05 -04:00
3 changed files with 3 additions and 6 deletions

4
package-lock.json generated
View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@ludus/ludus-js-pure", "name": "@ludus/ludus-js-pure",
"version": "0.1.17", "version": "0.1.18",
"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",

View File

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