<div dir="ltr">I'm not quite sure, but I'd guess either one of<div><br></div><div>1.) It does not compile at all because of suspicious indentation</div><div>2.) It will just print "A" but not "done" because that is considered beeing in the else-branch.</div></div><br><div class="gmail_quote"><div dir="ltr">Johannes Waldmann <<a href="mailto:johannes.waldmann@htwk-leipzig.de">johannes.waldmann@htwk-leipzig.de</a>> schrieb am Di., 15. Nov. 2016 um 13:11 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Cafe -<br class="gmail_msg">
<br class="gmail_msg">
Sometimes, a comment can change the meaning of a program.<br class="gmail_msg">
No? Well, but "commenting out" a line of code certainly does.<br class="gmail_msg">
So, can you guess what this program will output?<br class="gmail_msg">
<br class="gmail_msg">
main = do<br class="gmail_msg">
if True<br class="gmail_msg">
then do<br class="gmail_msg">
putStrLn "A"<br class="gmail_msg">
else do<br class="gmail_msg">
-- putStrLn "B"<br class="gmail_msg">
putStrLn "done"<br class="gmail_msg">
<br class="gmail_msg">
I nominate this for inclusion in a hypothetical<br class="gmail_msg">
Haskell equivalent of <a href="http://www.javapuzzlers.com/" rel="noreferrer" class="gmail_msg" target="_blank">http://www.javapuzzlers.com/</a><br class="gmail_msg">
<br class="gmail_msg">
- J.<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Haskell-Cafe mailing list<br class="gmail_msg">
To (un)subscribe, modify options or view archives go to:<br class="gmail_msg">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br class="gmail_msg">
Only members subscribed via the mailman list are allowed to post.</blockquote></div>