<div dir="ltr">Hi, <div><br></div><div>Going through the '<-' description in 'learnouahaskell' it says - </div><div><br></div><div><i>" If we have a Maybe String and we bind it with <- to a variable, that variable will be a String"</i><br></div><div><br></div><div>so if you write </div><div><br></div><div><font face="monospace, monospace">do</font></div><div><font face="monospace, monospace">str <- Just "3"</font></div><div><br></div><div><font face="monospace, monospace">str </font><font face="arial, helvetica, sans-serif">should be of type 'String'. My question is how do I return "34" by concatenating it to "4" because the following line of code fails - </font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">---</font></div><div><div><font face="monospace, monospace">do</font></div><div><font face="monospace, monospace">str <- Just "3"</font></div></div><div><font face="monospace, monospace">return str++"4"::Maybe String</font></div><div><font face="arial, helvetica, sans-serif">---</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">or for that matter how can I return/print just the value of </font><font face="monospace, monospace">str </font><font face="arial, helvetica, sans-serif">from this do block ?</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Thanks,</font></div><div><div><div class="gmail_signature"><div dir="ltr"><font color="#0b5394"><font style="background-color:rgb(255,255,255)"><font size="2" face="georgia, serif">Shishir </font></font></font><br></div></div></div>
</div></div>