From: Camil Staps Date: Fri, 24 Apr 2015 17:09:27 +0000 (+0200) Subject: Added Test (copy line from file to other file) X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=d484f944b5d39e32f74873abd617ac2d227b08df;p=fp1415.git Added Test (copy line from file to other file) --- diff --git a/fp2/week2/camil/Test.dcl b/fp2/week2/camil/Test.dcl new file mode 100644 index 0000000..21f08d1 --- /dev/null +++ b/fp2/week2/camil/Test.dcl @@ -0,0 +1 @@ +definition module Test diff --git a/fp2/week2/camil/Test.icl b/fp2/week2/camil/Test.icl new file mode 100644 index 0000000..8044d3f --- /dev/null +++ b/fp2/week2/camil/Test.icl @@ -0,0 +1,12 @@ +implementation module Test + +import StdIOMonad + +Start world = doIO ( + open "camil.txt" Lees >>= + \_ = open "mart.txt" Schrijf >>= + \_ = readline "camil.txt" >>= + \l = writeline (fromJust l) "mart.txt" >>= + \_ = close "camil.txt" >>= + \_ = close "mart.txt" + ) world