Normally yes, but here we are guaranteed to get a 'Just ...' value because of the 'isNothing' guard.<br>-deech<br><br><div class="gmail_quote">On Thu, Aug 5, 2010 at 5:47 PM, Brent Yorgey <span dir="ltr"><<a href="mailto:byorgey@seas.upenn.edu">byorgey@seas.upenn.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Thu, Aug 05, 2010 at 05:42:40PM -0500, aditya siram wrote:<br>
><br>
> brS :: Maybe Int -> String -> String<br>
> brS i ss<br>
> | isNothing i = ss<br>
> | otherwise = (take (fromJust i) ss) ++ (brS newIndex newStr)<br>
> where<br>
> newIndex = findIndex eqD newStr<br>
> newStr = drop ((fromJust i) +1) ss<br>
<br>
</div>/me makes deech write on the blackboard 100 times, "I will not use fromJust"<br>
<div><div></div><div class="h5">_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br>