On Mon, Feb 9, 2015 at 3:03 PM, Jonathan S. Shapiro <[email protected]> wrote: > On Mon, Feb 9, 2015 at 9:56 AM, Keean Schupke <[email protected]> wrote: >> >> Terminology: In the list comprehension the result and the input >> collections are all lists. > > > So what kind of comprehension is the example I gave: > > [ c | c <- s : String ] > > > because it seems to me that the input here is a String and the output is a > list of characters. Is this a string comprehension, a list comprehension, or > some third thing?
It seems to me that it'd be a list comprehension, because a string (as the output collection) is not generally incrementally constructed, though the length of the input string *is* known, it wouldn't be known if the input were a list of characters. absent type issues to call it a string comprehension would seem to me to imply these work with the allocation behavior generally recognized as the allocation behavior of strings... when that doesn't really appear to be the case. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
