概要
paiza.ioでelixirやってみた。
練習問題、見つけたので、やってみた。
参考にしたページ
サンプルコード
String.replace("Now I need a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.", ",", "")
|> String.replace(".", "")
|> String.split
|> Enum.map(fn x ->
String.length(x)
end)
|> IO.inspect
実行結果
[3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9]
成果物
以上。