diff options
-rw-r--r-- | assignment-1/program1.icl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/assignment-1/program1.icl b/assignment-1/program1.icl index 79e9102..611894f 100644 --- a/assignment-1/program1.icl +++ b/assignment-1/program1.icl @@ -2,7 +2,7 @@ module program1 import StdBool import StdEnum -from StdFunc import flip, o, seq +from StdFunc import flip, o import StdList import StdString import StdTuple @@ -60,7 +60,7 @@ instance serialize [a] | serialize a where // We don't actually need to start with [, but this gives some type safety. // The ] is necessary to recognise the end of the list. - write xs c = write "[" (seq (map write xs) (write "]" c)) + write xs c = write "[" (foldl (flip write) (write "]" c) xs) read ["[":r] = readElements [] r where readElements :: [a] [String] -> Maybe ([a], [String]) | serialize a |