# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #116525]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=116525 >
* [Coke] shudders at the new list model.
* [Coke] hasn't internalized it yet, so I keep doing things wrong with it.
<masak> [Coke]: I've been bitten by it too. I'd like to hear what trips you up.
<masak> r: say <a b c d>.kv.reverse.perl
15:05 <+p6eval> rakudo 388c1b: OUTPUT«((3, "d"), (2, "c"), (1, "b"),
(0, "a")).list»
<masak> I'd really expect that to flatten.
<masak> r: say <a b c d>.kv.flat.reverse.perl
<p6eval> rakudo 388c1b: OUTPUT«("d", 3, "c", 2, "b", 1, "a", 0).list»
<moritz> i guess it should
* masak submits rakudobug
<moritz> problem is, many of the methods were written by folk
(including me) that didn't really understand the list model back then
<tadzik> wait, why
<tadzik> why do you expect a list of pairs to flatten?
<masak> they're not pairs.
<masak> => makes pairs.
<masak> this is just sublists.
<tadzik> but honestly, I don't mind them in item context :)
<tadzik> you can always call flat. If you don't want that, you can't
call un-flat
<masak> tadzik: yes, you can always call flat. but my expectation is
that .kv gives me a flat list already. and then I'm surprised when
.reverse reverses things pairwise.