On Friday 29 June 2007, Andrew Coppin wrote: > Jon Cast wrote: > > On Wednesday 27 June 2007, Andrew Coppin wrote: > >> Wow, wait a sec - case expressions are allowed to have guards too?? > > > > Yes. I guess I assumed you knew that, sorry. > > > > The only syntactic (or semantic) difference between function equations > > and case expressions (aside from the fact that case expressions require > > you to tuple up the values you're pattern-matching on) is the fact that > > case expressions use -> where function bindings use =. Other than that, > > the two forms are exactly equivalent. > > I knew they were nearly identical. I didn't realise that they *were* > identical! > > Hmm, I tried to find out 1 thing and actually found out 2 things! :-D > > I wonder what the layout for that is... something like this? > > case foo of > patter1 > > | guard1 -> ... > | guard2 -> ... > > pattern2 > > | guard3 -> ... > | guard4 -> ...
Just so. Jonathan Cast http://sourceforge.net/projects/fid-core http://sourceforge.net/projects/fid-emacs _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe