小编Mar*_*han的帖子

具有cl:格式的列表中每隔三个单词后的换行符

如何~%在列表中的每三个参数后添加回车符(使用)?
我现在有:

(format nil "~{~a ~}" (list '"one" '"two" '"three" '"four" '"five" '"six" '"seven" '"eight" '"nine" '"ten"))  
;=> "one two three four five six seven eight nine ten " 
Run Code Online (Sandbox Code Playgroud)

但我想:

;=> "one two three  
; four five six  
; seven eight nine  
; ten "  
Run Code Online (Sandbox Code Playgroud)

lisp format common-lisp

5
推荐指数
1
解决办法
379
查看次数

标签 统计

common-lisp ×1

format ×1

lisp ×1