Luke Kanies wrote:
...
>> Note that Rails also uses this style; e.g., it's common to see  
>> things like
>>
>> total = Product.find(product_list).sum(&:price)
> 
> This isn't a terribly good example (since Product.find returns an  
> instance of Product and then sum returns a number), but I understand  
> what you mean.
> 
>> where the result of one method is the object that is used for the  
>> subsequent method.
>>
>> I haven't looked all through the Puppet source for this, but, yes,  
>> it would be
>> good to be done everywhere, not just this one file.  It would be a  
>> technically
>> straightforward task to do (just tedious).  I'd suggest either  
>> putting together
>> a set of Redmine tasks, and perhaps to put it aside and apply for a  
>> Google
>> Summer of Code student next year if no one has gotten to it by Feb/ 
>> March.
> 
> I guess my main question is when this would be used, but I suppose  
> it's 'any method whose return you don't care about'?
> 

Would it be more clear to say it is "any method who is not necessarily 
returning 
some new kind of value but is mainly used for its side-effects'.

Steven Jenkins
End Point Corporation


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to