first, a suggestion - why don't you put around your end result map, so we can easily chain multimaps.

In part because I didn't think of doing that. But now you've made me think about it, I think that I would leave it as it is. Adding it internally would make the user that wants the the list rather than a LoL have to wrap the call in @{ multimap [ ... ] } to get at it.

As is, to get the LoL, you do [ multimap [ ...] ].

In the former I would be creating a list only for the user to discard it. In the latter, he creates it if he needs it. Which I think is a good reason to leave it as is?

'multimap' may not be the best name for that function..

I just went with the OPs name, but I agree that it may not best capture the semantics. I'd favour something shorter. 'map' is well understood in Perl circles so I think that should be in there somewhere.

What is Data::Dumper::SLC?

It's my Just_a_Dumper dumper. No attempt at making the output evallable. No attempt to fold self-referrencial structures (though it does economically detect and flag them). It streams on-the-fly (avoiding accumlating anything in memory) to STDOUT (or an option filehandle) and wraps at 80 or a specifyable limit. It writes as compact a representation as is comensurate with being readable.

When I asked here if anyone knew of such an animal, the basic respose was that nobody except myself ever needed such a thing, so I never got around to documenting or packaging it.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

In reply to Re^5: More functional programming utilities by BrowserUk
in thread More functional programming utilities by kaif

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.