[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: iterator sequences (was: Standard libraries)
- From: Mark Hamburg <mark@...>
- Date: Sat, 2 Jan 2010 10:16:48 -0800
Responding to various earlier messages including my own:
* I had second thoughts this morning about the "cleverness" of auto generating mapping behavior though it has precedence in things like promise pipelining.
* I too had been feeling that many of the operations needed versions that would skip the key though I was thinking "mapv" instead of "vmap". Another option would be to support a mode notion for sequences that would control whether operations see and modify the keys or not.
* I think the "done" trick can be readily made to signal an error in the same way that my foreach implementation did. In fact, the use of "iterate" could mark the sequence as done. Hence, I think that "collect" and its ilk remain viable. The only real difference between collect and foreach is that the former needs to pass results back out.
* We probably want to include support for passing extra leading parameters into things like map and filter. This works much like having a bind facility and might actually be based on some form of bind support: ( seq.mapv string.format "The value is: %d" )
Mark