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

Whatever-currying of chained comparison ops fails in Rakudo #2542

Closed
p6rt opened this issue Oct 29, 2011 · 6 comments
Closed

Whatever-currying of chained comparison ops fails in Rakudo #2542

p6rt opened this issue Oct 29, 2011 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 29, 2011

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

Searchable as RT102466$

@p6rt
Copy link
Author

p6rt commented Oct 29, 2011

From @masak

<colomon> rakudo​: say (1..100).grep(10 < * < 20).gist
<p6eval> rakudo 9c6aed​: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
86 87 88 89 90 91 9…
<colomon> b​: say (1..100).grep(10 < * < 20).perl
<p6eval> b 1b7dd1​: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70…
<colomon> niecza​: say (1..100).grep(10 < * < 20).perl
<p6eval> niecza v10-225-gbd53b44​: OUTPUT«(11, 12, 13, 14, 15, 16, 17,
18, 19).list␤»
<colomon> niecza++
<colomon> masak​: ^^ known bug?
<masak> colomon​: no, looks new to me.
* masak submits rakudobug
<masak> colomon++
<masak> nom​: say (1..100).grep(* < 20).perl
<p6eval> nom 9c6aed​: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19).list␤»
<masak> nom​: say (1..100).grep({ 10 < $_ < 20 }).perl
<p6eval> nom 9c6aed​: OUTPUT«(11, 12, 13, 14, 15, 16, 17, 18, 19).list␤»
<masak> innerestin'
<jnthn> masak​: Probably something to do with auto-currying

@p6rt
Copy link
Author

p6rt commented Oct 31, 2011

From @moritz

FWIW it's only the currying of the chained operator that fails, grep()
works fine.

Tested in t/spec/S02-types/whatever.t

@p6rt
Copy link
Author

p6rt commented Oct 31, 2011

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

@p6rt
Copy link
Author

p6rt commented Dec 14, 2013

From @timo

I made a branch "chained_whatevercode" for rakudo that annotates WhateverCode objects that were created for a "chain" op with the original arguments and when another WhateverCode with a chain op finds that WhateverCode instance in its arguments, it will flatten out the old arguments in itself.

After spectesting, I'll merge this into nom.

@p6rt
Copy link
Author

p6rt commented Dec 14, 2013

From @timo

fixed my branch, merged it into nom.

@p6rt
Copy link
Author

p6rt commented Dec 14, 2013

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

@p6rt p6rt closed this as completed Dec 14, 2013
@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