Re: Nice manual.
Rohan Hart <[email protected]> Tue, 28 Jun 2005 09:41:09 +1200
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 27 Jun 2005, Tom Kaitchuck said: > Is example 7.4 in the nice manual correct? How does 'i' get assigned in > the first place? 7.4: int[] squares = fill(new int[10], int i => i * i); fill (simplified): <T> T[] fill(T[] array, int->T value) 'i' is a parameter to the anonymous function created by int i => ... and passed to fill as its 'value' parameter. fill will then call 'value' passing in an int which will be assigned to 'i' in the normal way. Rohan ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click