[Rails] Re: evaluating expressions left to right

2012-12-27 Thread John Merlino
That was my hunch. Thanks for clarifying. On Wednesday, December 26, 2012 6:48:18 PM UTC-5, Matt Jones wrote: On Tuesday, 25 December 2012 20:13:16 UTC-5, John Merlino wrote: ok, it didn't look like nested methods. But I made to believe that this: sum=square*deviation|a is exactly

[Rails] Re: evaluating expressions left to right

2012-12-26 Thread Matt Jones
On Tuesday, 25 December 2012 20:13:16 UTC-5, John Merlino wrote: ok, it didn't look like nested methods. But I made to believe that this: sum=square*deviation|a is exactly the same as this: sum=(square*(deviation|(a))) So if this is true, then still a question remains. That's

[Rails] Re: evaluating expressions left to right

2012-12-25 Thread John Merlino
ok, it didn't look like nested methods. But I made to believe that this: sum=square*deviation|a is exactly the same as this: sum=(square*(deviation|(a))) So if this is true, then still a question remains. Here's the original context again: module Functional def compose(f) if

[Rails] Re: evaluating expressions left to right

2012-12-23 Thread 7stud --
In this method call: meth1(meth2(meth3)) ...which value has has to be computed first so that meth1 can return? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

Re: [Rails] Re: evaluating expressions left to right

2012-12-23 Thread Jordon Bedwell
meth3 - (meth2) - (meth1) The logic is that meth3 has to return so that meth2 can accept, process and return so that meth1 can accept, process and return. Don't read nested methods like you read a book, with nested methods the last to be nested is the first to be executed. On Sun, Dec 23, 2012

Re: [Rails] Re: evaluating expressions left to right

2012-12-23 Thread Colin Law
If you think about it there is only one possible answer to that question. How could it evaluate meth2(meth3) without evaluating meth3 first, in order to pass the result to meth2? Similarly how could it call meth1 before it evaluated the parameter to pass to it? Colin On 23 December 2012 08:14,