Add tags

Add tags to the following comment

愚直な実装です

1
2
3
4
5
6
import System.Environment
replace s (f,t) = map (\x->if x == f then t else x) s
tr s fro = last . scanl replace s . zip fro
main = do 
  fro:to:s:xs <- getArgs
  putStrLn $ tr s fro to

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...