我必须合并单词列表才能生成段落。我管理的以下内容:将单词列表结合到Racket中的一个段落
(define (wordlist2para wl)
(define str " ")
(for ((w wl))
(set! str (string-append str w " ")))
(string-trim str))
(wordlist2para '("this" "is" "a" "test"))
输出:
"this is a test"
它的工作原理,但它不是功能。我如何为此编写功能代码?
功能好的编码。 – rnso