fix words

This commit is contained in:
Scott Richmond 2024-06-17 13:29:08 -04:00
parent 848ba249ca
commit 8eed4145db
2 changed files with 4 additions and 4 deletions

View File

@ -377,9 +377,9 @@ fn words {
let no_punct = strip (str)
let strs = split (no_punct, " ")
fn worder (list, str) -> if empty? (str)
then do list > report!
else do append (list, str) > report!
do fold (worder, strs, []) > report!
then list
else append (list, str)
fold (worder, strs, [])
}
}

View File

@ -52,7 +52,7 @@
(comment
# (do
(def source `
fold (add, [1, 2, 3])
words ("foo bar ba,;;;!!!z")
`)
(def out (-> source
ludus