Added Test (copy line from file to other file)
authorCamil Staps <info@camilstaps.nl>
Fri, 24 Apr 2015 17:09:27 +0000 (19:09 +0200)
committerCamil Staps <info@camilstaps.nl>
Fri, 24 Apr 2015 17:09:27 +0000 (19:09 +0200)
fp2/week2/camil/Test.dcl [new file with mode: 0644]
fp2/week2/camil/Test.icl [new file with mode: 0644]

diff --git a/fp2/week2/camil/Test.dcl b/fp2/week2/camil/Test.dcl
new file mode 100644 (file)
index 0000000..21f08d1
--- /dev/null
@@ -0,0 +1 @@
+definition module Test
diff --git a/fp2/week2/camil/Test.icl b/fp2/week2/camil/Test.icl
new file mode 100644 (file)
index 0000000..8044d3f
--- /dev/null
@@ -0,0 +1,12 @@
+implementation module Test\r
+\r
+import StdIOMonad\r
+\r
+Start world = doIO (\r
+       open "camil.txt" Lees >>=\r
+       \_ = open "mart.txt" Schrijf >>=\r
+       \_ = readline "camil.txt" >>=\r
+       \l = writeline (fromJust l) "mart.txt" >>=\r
+       \_ = close "camil.txt" >>=\r
+       \_ = close "mart.txt"\r
+       ) world\r