diff options
Diffstat (limited to 'appendtodo.hs')
-rw-r--r-- | appendtodo.hs | 8 |
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) |