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

minmax operator not working yet #1069

Closed
p6rt opened this issue Jun 16, 2009 · 9 comments
Closed

minmax operator not working yet #1069

p6rt opened this issue Jun 16, 2009 · 9 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 16, 2009

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

Searchable as RT66640$

@p6rt
Copy link
Author

p6rt commented Jun 16, 2009

From @finanalyst

my @​a=1,2,3,4; my @​b=9,8,7,1; say (@​a minmax @​b).perl

yields an error

S03​:1621 gives @​a minmax @​b as an example.

@p6rt
Copy link
Author

p6rt commented Jun 25, 2009

From @pmichaud

On Tue Jun 16 10​:14​:11 2009, richardh wrote​:

my @​a=1,2,3,4; my @​b=9,8,7,1; say (@​a minmax @​b).perl

While rakudo doesn't implement infix​:<minmax> yet, the operator is
constrained to having two elements on either side, so the above code
wouldn't work anyway.

It would be good to have some tests for infix​:<minmax> -- that should
make it much easier to implement.

Pm

@p6rt
Copy link
Author

p6rt commented Jun 25, 2009

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

@p6rt
Copy link
Author

p6rt commented Jun 26, 2009

From @finanalyst

I dont quite understand, see below​:

Patrick R. Michaud via RT wrote​:

On Tue Jun 16 10​:14​:11 2009, richardh wrote​:

my @​a=1,2,3,4; my @​b=9,8,7,1; say (@​a minmax @​b).perl

While rakudo doesn't implement infix​:<minmax> yet, the operator is
constrained to having two elements on either side, so the above code
wouldn't work anyway.

I took
@​a minmax @​b
from the Spec.

say (...).perl
formats and prints the return value.

What have I misunderstood?

It would be good to have some tests for infix​:<minmax> -- that should
make it much easier to implement.

Pm

@p6rt
Copy link
Author

p6rt commented Jun 27, 2009

From @pmichaud

On Fri, Jun 26, 2009 at 08​:37​:20AM -0700, Richard Hainsworth via RT wrote​:

my @​a=1,2,3,4; my @​b=9,8,7,1; say (@​a minmax @​b).perl

While rakudo doesn't implement infix​:<minmax> yet, the operator is
constrained to having two elements on either side, so the above code
wouldn't work anyway.

I took
@​a minmax @​b
from the Spec.

Yes, the spec mentions C< @​a minmax @​b >; it also says that the
result would be (@​a[0] min @​b[0], @​a[1] max @​b[1]) . So in
your example above, would you expect the result to be (1, 8) ?

Pm

@p6rt
Copy link
Author

p6rt commented Jun 28, 2009

From @finanalyst

Patrick R. Michaud via RT wrote​:

On Fri, Jun 26, 2009 at 08​:37​:20AM -0700, Richard Hainsworth via RT wrote​:

my @​a=1,2,3,4; my @​b=9,8,7,1; say (@​a minmax @​b).perl

While rakudo doesn't implement infix​:<minmax> yet, the operator is
constrained to having two elements on either side, so the above code
wouldn't work anyway.

I took
@​a minmax @​b
from the Spec.

Yes, the spec mentions C< @​a minmax @​b >; it also says that the
result would be (@​a[0] min @​b[0], @​a[1] max @​b[1]) . So in
your example above, would you expect the result to be (1, 8) ?

Pm

Yes. I was expecting a list of two integers.
Wouldn't .perl.say yield [1,8] ?
Richard

@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

From @pmichaud

The infix​:<minmax> operator has now been added in Rakudo a4978b9, with a
test added to t/spec/S03-operator/misc.t in r27322.

Closing ticket,

Pm

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

From @pmichaud

The infix​:<minmax> operator has now been added in Rakudo a4978b9, with a
test added to t/spec/S03-operator/misc.t in r27322.

Closing ticket,

Pm

@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

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

@p6rt p6rt closed this as completed Jun 30, 2009
@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