One reasonable metric for rating them might be: Imagine you're seeing the function name for the first time, together with a definition of its signature (parameter/return types). Would you have guessed its correct meaning? How sure would you have been?

Of course that's still subjective, so let me present my intuitive reactions so that you can compare them to your own:

Simple version of the function: Map a list to all its subsequences of 2 adjacent items

For the "pairwise" version, the function would only take a code block and a list. Given that function signature, I think the only ones for which I would have guessed the correct meaning and would have been reasonably sure about it, are:

RESULT_LIST = map_adjacent { CODE } LIST
RESULT_LIST = neighbors { CODE } LIST

A few comments on some of the others:

Generalized version of the function: Map a list to all its subsequences of n adjacent items

In this case, the function would likely take a code block, a number, and a list. Unfortunately, I don't think I would be very sure about any of my guesses in this scenario, for any of the suggested names. One that hasn't been suggested yet (probably because it's too long), but would be pretty self-explanatory for me, is:

RESULT_LIST = natatime_sliding { CODE } NUMBER, LIST

Those where there's at least a decent chance that I would have guessed the correct meaning, are, in descending order:

RESULT_LIST = map_adjacent { CODE } NUMBER, LIST
RESULT_LIST = moving { CODE } NUMBER, LIST
RESULT_LIST = slide { CODE } NUMBER, LIST

moving is nice because it's effectively a generalization of "moving average" to "moving <custom calculation>"...

@moving_averages = moving { sum(@_)/@_ } $n, @data

...but of course if the context in which you're using it has nothing to do with statistics, that recognition value will be lost.

between and map_right_neighbour wouldn't work at all anymore for n > 2.
adjoin, overlaps, mapAdj and pipeline would still have the same problems as above.


In reply to Re^2: Want for a name? (Final thoughts; strong feelings; votes?) by smls
in thread Want for a name? by BrowserUk

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, 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.