9
8

More than 5 years have passed since last update.

Haskellで標準入力から読み込んだデータを処理して標準出力に出力する。

Posted at

Haskellでワンライナーを書く為の覚え書き

変換処理を無名関数にしてfの部分に挿入する。

main=interact$unlines.map.(f).lines
f::String->String
f s=変換処理

main=interact$unlines.map(show.(f)).lines
f::String->Int
f s=変換処理

main=interact$unlines.map(show.(f).read).lines
f::Int->Int
f n=変換処理
9
8
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
9
8