# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #103178]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=103178 >


<masak> rakudo: Inf.S
<p6eval> rakudo c0b2e3: OUTPUT«Method 'S' not found for invocant of
class 'Num' [...]
<masak> rakudo: class A { has Int $.S = 0 }; say (A.new, A.new, A.new).min(*.S)
<p6eval> rakudo c0b2e3: OUTPUT«Method 'S' not found for invocant of
class 'Num' [...]
<masak> I think the former is what's happening in the latter.
* masak submits rakudobug
<masak> Inf is nice and all, but I think the above shows that the
value Inf is not enough in the .min method (because we don't want to
call Inf.S) -- rather, we need to special-case the initial value of
the accumulator variable somehow.
<masak> TimToady: this would be a case of using an in-band value and
wishing it were out-of-band, I guess :)
<masak> put differently, you can't both have Inf in that algorithm,
and arbitrary closures that invoke on the smallest-value-found-so-far.

Reply via email to