LoginSignup
1
0

paiza.ioでelixir その285

Posted at

概要

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]

成果物

以上。

1
0
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
0