Talk:Brace expansion: Difference between revisions

(→‎Duplicate supression: bug in the Perl 6 solution)
(→‎Duplicate supression: see earlier fix)
Line 38:
:We still get four entries for the first one, and the dupes aren't removed from the second one. I don't know what you're doing different, offhand, perhaps not throwing away stuff when you backtrack? --[[User:TimToady|TimToady]] ([[User talk:TimToady|talk]]) 18:54, 31 January 2014 (UTC)
::Actually, there ''does'' seem to be a bug in the latest revision of the Perl 6 solution (which wasn't present in the original revision). Either that, or the Rakudo Star version I'm using to test it is too old or something. Because ''without'' the inserted X / Y, it only prints 2 expansions for that test case. --[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 19:07, 31 January 2014 (UTC)
:::You don't have latest version, which I fixed in the last hour. --[[User:TimToady|TimToady]] ([[User talk:TimToady|talk]]) 19:13, 31 January 2014 (UTC)
 
:The reference solution (Perl, not Perl 6) does agree with the spec: There should be no suppression of duplicates. As for the test case you mention, it has '''four''' expansions and not eight, because nested brace groups only expand the "branch" they belong to. For example, the pattern <code>aa{,{,11}cc}22</code> has three expansions (<code>aa22</code>&nbsp; <code>aacc22</code>&nbsp; <code>aa11cc22</code>), not four. --[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 18:58, 31 January 2014 (UTC)
Anonymous user