Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: perl6 rational number problem

by NetWallah (Canon)
on Nov 21, 2017 at 05:42 UTC ( #1203861=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    > my Rat @example =  1 , * ** 0.9999 ... Inf;
    [...]
    > @example[^4]
    Type check failed in assignment to @example; expected Rat but got Int
      in block <unit> at <unknown file>:1
    
  2. or download this
    > my Rat @example =  1.0, * ** 0.9999 ... Inf;
    [...]
    ...
    
    > @example[0]
    1
    
  3. or download this
    > my Rat @example =  1.0, * += 0.9999 ... Inf;
    [...]
    > @example[^4]
    (1 1.9999 2.9998 3.9997)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1203861]
help
Chatterbox?
[Discipulus]: someone can explain last faq by jdporter? if humor i missed it

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2018-06-22 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (122 votes). Check out past polls.

    Notices?