Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Haskell vs Perl 6 (was Re: Capturing parenthesis and grouping square brackets)

by raiph (Hermit)
on Jul 04, 2013 at 15:27 UTC ( #1042474=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Haskell vs Perl 6 (was Re: Capturing parenthesis and grouping square brackets)
in thread Capturing parenthesis and grouping square brackets

I'd add a note saying something like "While the code looks like the two trees are flattened to lists first and then compared, Haskell is lazy, which means that behind the scenes it will only do as much work as it has to and stop flattening once it finds the first mismatch. Simply don't worry about it. It works."

This is misleading, as it suggests that P6's gather/take is not lazy. Would you be willing to update your comment to fix this mistake?

Update: I was wrong. Apologies to Jenda.


Comment on Re^3: Haskell vs Perl 6 (was Re: Capturing parenthesis and grouping square brackets)
Re^4: Haskell vs Perl 6 (was Re: Capturing parenthesis and grouping square brackets)
by Jenda (Abbot) on Jul 04, 2013 at 15:46 UTC

    BEG YOUR PARDON?!?

    How does a note suggested to be added to the explanation of the Haskell code "suggest P6's gather/take is not lazy"? There was no mention of Perl6 in that comment, neither direct, nor intended, nor implied!

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1042474]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2014-12-25 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls