fix words
This commit is contained in:
parent
848ba249ca
commit
8eed4145db
|
@ -377,9 +377,9 @@ fn words {
|
||||||
let no_punct = strip (str)
|
let no_punct = strip (str)
|
||||||
let strs = split (no_punct, " ")
|
let strs = split (no_punct, " ")
|
||||||
fn worder (list, str) -> if empty? (str)
|
fn worder (list, str) -> if empty? (str)
|
||||||
then do list > report!
|
then list
|
||||||
else do append (list, str) > report!
|
else append (list, str)
|
||||||
do fold (worder, strs, []) > report!
|
fold (worder, strs, [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
(comment
|
(comment
|
||||||
# (do
|
# (do
|
||||||
(def source `
|
(def source `
|
||||||
fold (add, [1, 2, 3])
|
words ("foo bar ba,;;;!!!z")
|
||||||
`)
|
`)
|
||||||
(def out (-> source
|
(def out (-> source
|
||||||
ludus
|
ludus
|
||||||
|
|
Loading…
Reference in New Issue
Block a user