I think it's because + is left associative. and pattern matching is top to bottom. 1 + 1 + 1 => (1 + 1) + 1 => found match: 1 + 1 = 3 => 3 + 1 => found match: 3 + 1 = 3 => 3
On Thu, Sep 18, 2008 at 11:01 PM, Steven Shaw <[EMAIL PROTECTED]> wrote: > 2008/9/19 Evan Laforge <[EMAIL PROTECTED]> >> let {1 + 1 = 3; 3 + 1 = 3} in 1 + 1 + 1 > > Which gives 3. > > Perhaps even more confusing is: > > let {1 + 1 = 3; 3 + 1 = 3} in 3 + 1 + 1 > > which gives 3 > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe