Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triangle-reduce operator [\ ] unexpectedly flattens each result #6022

Closed
p6rt opened this issue Jan 21, 2017 · 5 comments
Closed

Triangle-reduce operator [\ ] unexpectedly flattens each result #6022

p6rt opened this issue Jan 21, 2017 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 21, 2017

Migrated from rt.perl.org#130610 (status was 'resolved')

Searchable as RT130610$

@p6rt
Copy link
Author

p6rt commented Jan 21, 2017

From @smls

The normal reduce meta-operator doesn't flatten anything​:

  ➜ say [,] <a b>, <c d>, <e f>;
  ((a b) (c d) (e f))

But the triangle-reduce operator flattens each of the intermediate
results it returns​:

  ➜ .say for [\,] <a b>, <c d>, <e f>;
  (a b)
  (a b c d)
  (a b c d e f)

The result I expected for that last statement, is​:

  ((a b))
  ((a b) (c d))
  ((a b) (c d) (e f))

@p6rt
Copy link
Author

p6rt commented Mar 16, 2017

From @FCO

rakudo/rakudo#1041

Em Sat, 21 Jan 2017 06​:23​:02 -0800, smls75@​gmail.com escreveu​:

The normal reduce meta-operator doesn't flatten anything​:

➜  say \[,\] \<a b>, \<c d>, \<e f>;
\(\(a b\) \(c d\) \(e f\)\)

But the triangle-reduce operator flattens each of the intermediate
results it returns​:

➜  \.say for \[\\,\] \<a b>, \<c d>, \<e f>;
\(a b\)
\(a b c d\)
\(a b c d e f\)

The result I expected for that last statement, is​:

\(\(a b\)\)
\(\(a b\) \(c d\)\)
\(\(a b\) \(c d\) \(e f\)\)

@p6rt
Copy link
Author

p6rt commented Mar 16, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Mar 16, 2017

@FCO - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Mar 16, 2017
@p6rt
Copy link
Author

p6rt commented Mar 16, 2017

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant