1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

文字列のリストを連結する

Last updated at Posted at 2015-12-01

reduce関数を使って文字列が入ったリストの要素を全て連結する。

(reduce (lambda ($0 $1) (concatenate 'string $0 ", " $1)) '("hoge" "fuga" "piyo"))
==> "hoge, fuga, piyo"

でもformat関数を使ったほうが楽かもしれない。

(format nil "~{~A~^, ~}" '("hoge" "fuga" "piyo"))
==> "hoge, fuga, piyo"

こういう単純な処理で割とつまずく。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?