Hi All,

What in the world are they trying to say here?

https://docs.perl6.org/routine/Rat
    (Numeric) method Rat

    method Rat(Numeric:D: Real $epsilon = 1.0e-6 --> Rat:D)

    If this Numeric is equivalent to a Real, return a Rat which
    is within $epsilon of that Real's value. Fail
    with X::Numeric::Real otherwise.

And is this why I can not find a type "Rat"?  Because
it is a method?

Then why does
    $ p6 'my Real $x; $x = 3.1415; dd $x;'
    Rat $x = 3.1415
say it is a type "Rat"?


Yours in confusion,
-T

Reply via email to