> I look forward to being corrected, but all the examples I've seen of
> lambaj show things like:
>
> forEach(someCollection).setSomeMethod(withThis);
>
> Giving to mind that forEach() returns some dynamic proxy to
> someCollection that iterates over it, calling the provided method,
> which is great for somethings, but in almost 99% of the times I've
> wanted a nice closure based syntax for this, I've wanted to call
> multiple statements on each item, or refer to the 'each' as part of
> that statement, such like:
>
> someCollection.forEach(each => each.value = each.value * 2);
>
> Unless theres something akin to how Mockito handles parameters I don't
> see how they're comparable, does lambaj allow for something like:
>
> forEach(someCollection).setEach(each().getValue() * 2)
>
> with each() return a ThreadLocal bound value from each iteration?
>
> --
> Pull me down under...

Did you give a look at this?

http://code.google.com/p/lambdaj/wiki/Closures

--

You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javapo...@googlegroups.com.
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=.


Reply via email to