浏览代码

Echo and reverse

DricomDragon 5 年之前
父节点
当前提交
fddc128534
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      io_rev.hs

+ 7 - 0
io_rev.hs

@@ -0,0 +1,7 @@
+-- Slide 55
+-- It makes more sense to compile this file
+
+import Data.List
+
+main::IO()
+main = getLine >>= putStrLn.(\x -> concat [x, " ", reverse x])