[Haskell-beginners] mayBe stuck
Brent Yorgey
byorgey at seas.upenn.edu
Thu Aug 5 18:47:52 EDT 2010
On Thu, Aug 05, 2010 at 05:42:40PM -0500, aditya siram wrote:
>
> brS :: Maybe Int -> String -> String
> brS i ss
> | isNothing i = ss
> | otherwise = (take (fromJust i) ss) ++ (brS newIndex newStr)
> where
> newIndex = findIndex eqD newStr
> newStr = drop ((fromJust i) +1) ss
/me makes deech write on the blackboard 100 times, "I will not use fromJust"
More information about the Beginners
mailing list