summaryrefslogtreecommitdiff
path: root/appendtodo.hs
diff options
context:
space:
mode:
Diffstat (limited to 'appendtodo.hs')
-rw-r--r--appendtodo.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/appendtodo.hs b/appendtodo.hs
new file mode 100644
index 0000000..6c3970c
--- /dev/null
+++ b/appendtodo.hs
@@ -0,0 +1,8 @@
+import System.IO
+
+main = do
+ todoItem <- getLine
+ if null todoItem then return ()
+ else (do
+ appendFile "todo.txt" (todoItem ++ "\n")
+ main)