[Haskell-beginners] Re: mayBe stuck
prad at towardsfreedom.com
Wed Aug 11 15:47:57 EDT 2010
On Sat, 7 Aug 2010 09:26:10 +0100
Brent Yorgey <byorgey at seas.upenn.edu> wrote:
> > also, is it better to use pattern matching (x:xs) than head and
> > tail? could that be part of the point here too?
> Yes, that's exactly right.
inspired by this i'm minimizing using head and tail everywhere i can.
i like pattern matching even when the expression becomes complex
because you see what you get more easily, imho.
there are some rare situations where i've used head, but only because it
would be very awkward to try to pattern match.
... with you on your journey
Information, Inspiration, Imagination - truly a site for soaring I's
More information about the Beginners