trivial diff: simplify samples/cat.m

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Nov 5 04:43:21 AEDT 1998


Estimated hours taken: 0.1

samples/cat.m:
	Simplify the code a little.

Index: samples/cat.m
===================================================================
RCS file: /home/mercury1/repository/mercury/samples/cat.m,v
retrieving revision 1.3
diff -u -r1.3 cat.m
--- cat.m	1998/09/09 06:04:45	1.3
+++ cat.m	1998/11/04 17:40:37
@@ -61,15 +61,9 @@
 
 cat -->
 	io__read_line_as_string(Result),
-	cat_2(Result).
-
-:- pred cat_2(io__result(string)::in, io__state::di, io__state::uo) is det.
-
-cat_2(Result) -->
 	( { Result = ok(Line) },
 		io__write_string(Line),
-		io__read_line_as_string(NextResult),
-		cat_2(NextResult)
+		cat
 	; { Result = eof }
 	; { Result = error(Error) },
 		{ io__error_message(Error, Message) },


-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list