Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Yes, I do admire this simple and clear code.

Choosing good names is an art and in terms of linguistic craft and agonizing over choosing good names, I claim that TimToady has no equal. :) As a former pacman player, I appreciate the (evocative) munch more than List::MoreUtils hard-to-pronounce natatime.

With functional-style languages, you need a lot of names, so choosing good and consistent names is crucial. Certainly, Haskell has a vast number of functions in its core library; related Haskell names here appear to be take, drop and splitAt from Data.List; more specific to the problem at hand, though not in core, is hackage Data.List.Split's splitEvery aka chunk. Does Perl 6 have equivalents to Haskell's take, drop, splitAt, splitEvery?

While salivating over munch, I hungrily searched for its documentation. Googling for "Perl 6 munch" left me unsatisfied, turning up only the Edvard Munch Museum tourist attraction in Oslo, among various IRC logs and blog entries, but no hits from the official Perl 6 docs. And I couldn't find it in S32-setting-library-Containers ... though I did find vaguely related Perl 6 names there, namely: shift, pop, splice, zip. Does anyone know where munch is officially documented?

Update: I just checked an online dictionary and it appears that munch and chomp mean almost the same thing:

chomp - To chew or bite on noisily
munch - To chew or eat (food) audibly or with pleasure
A mouthwatering challenge is to explain to a Perl 6 newbie how to remember which one does what. :)


In reply to Re^2: Rosetta code: Split an array into chunks by eyepopslikeamosquito
in thread Rosetta code: Split an array into chunks by eyepopslikeamosquito

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (6)
    As of 2015-07-06 10:03 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (71 votes), past polls