3
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 1 year has passed since last update.

草莽Erlang ── 43. lists:concat

Last updated at Posted at 2023-02-28

口で言うより行うことがErlang習得への近道と信じています。

lists:concat/1

concat([atom | integer | float | string]) -> string
concat(リスト) -> 「テキスト表現」が連結された文字列

lists:concat/1は各リスト要素の「テキスト表現」を連結します。リスト要素は、アトム、整数、浮動小数点数、文字列のいずれかである必要があります。

> lists:concat([1, 2, 3]).
"123"

> lists:concat(["1", 2, '3']).
"123"

% 浮動小数点数には使いにくいかも?
> lists:concat([123.0, " USD"]).
"1.23000000000000000000e+02 USD"

listsモジュールには他にもリスト処理のための関数がたくさんあります。

Elixirにも挑戦したい

闘魂ElixirシリーズとElixir Schoolがオススメです。

3
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
3
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?