[Haskell-beginners] Re: mayBe stuck

prad prad at towardsfreedom.com
Thu Aug 5 20:00:13 EDT 2010


On Thu, 5 Aug 2010 23:39:23 +0100
Brent Yorgey <byorgey at seas.upenn.edu> wrote:

> Also, did you know there is already code to do this in the 'split'
> package on Hackage?  (Just 'cabal install split' and look at the
> 'Data.List.Split' module.) 
>
thx brent. i've looked at various goodies from cabal and am trying to
understand the code. for instance, there is a split function in Useful
that i was trying to figure out as well as a replace (which is what
this is eventually going to develop into). i'm just trying to see if i
can get a better understanding by coming up with my own versions as
well.

unfortunately, i had no clue about the issue with mayBe and how to deal
with findIndex. though this Just Int and Nothing business is an
inconvenience presently, it feels somehow more honest that what some
languages do where if something isn't found the function returns 0.

thank you for your explanation too as well as those by deech and
jurgen. they've cleared up several things.



-- 
In friendship,
prad

                                      ... with you on your journey
Towards Freedom
http://www.towardsfreedom.com (website)
Information, Inspiration, Imagination - truly a site for soaring I's




More information about the Beginners mailing list