# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #98954] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=98954 >
<masak> b: my @a = [1], [2], [3]; say (map { @a[1 - $_][0] }, 0 .. 3).perl <p6eval> b 1b7dd1: OUTPUT«(2, 1, Any, Any)» <masak> nom: my @a = [1], [2], [3]; say (map { @a[1 - $_][0] }, 0 .. 3).perl <p6eval> nom 08ef94: OUTPUT«(2, 1).list» * masak submits rakudobug <tadzik> here we go again <masak> tadzik: this change in semantics causes connect-4 to give the first player the win on the first move. <tadzik> masak: serious business <masak> tadzik: seems connect-4's winning condition relied on being able to do negative indexing. <masak> tadzik: I have no trouble believing that this isn't spectested. <masak> and I have no horse in this race. I'll gladly rewrite that part of connect-4 if need be. <masak> but until there's a verdict, it goes into RT. <masak> niecza: my @a = [1], [2], [3]; say (map { @a[1 - $_][0] }, 0 .. 3).perl <p6eval> niecza v9-23-g1a8efca: OUTPUT«(2, 1, Any, Any).list» [23:52] <masak> there'a another data point, I guess. <jnthn> nom: my @a = [1], [2], [3]; say (map { say @a[1 - $_][0].WHAT; @a[1 - $_][0] }, 0 .. 3).perl <p6eval> nom 08ef94: OUTPUT«Int()Int()NilNil(2, 1).list» <jnthn> nom: say (map { Nil }, 0 .. 3).perl <p6eval> nom 08ef94: OUTPUT«().list» <jnthn> masak: There's the underlying thing. <masak> jnthn: I suspected that. <masak> jnthn: why Nil and not Any? <jnthn> masak: I can believe that's actually correct. But I'm not quite sure if the Nil you got before is wrong. <jnthn> masak: That is, it's not map's fault..but @a[1 - $_][0] returning Nil may be wrong. <masak> aye. <masak> I know. <jnthn> Well, so that golfs if. :) Does the spec say that one should get Nil in this case? I was fine with getting Any. Note also that Niecza agrees.