the 'broken' statement

Henry Spencer henry at utzoo.UUCP
Wed Oct 5 09:17:02 AEST 1983


Bill Wulf suggested some years ago that in addition to the FOR loop,
which is good for operating on all elements of a data structure, there
ought to be a FIRST loop for searching data structures:

	FIRST i IN something-that-generates-a-sequence-of-values
	SUCHTHAT condition
	DO
		found it
	ELSE
		not found
	END

(Ignore the exact punctuation, it was something like that.)  I always
thought this was a pretty neat idea.  It's far too late to retrofit
it to C, of course.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list