Help for this page

Select Code to Download


  1. or download this
    class Interval {
        has Real $.lb is rw = die 'Lower bound is required';
    ...
    say $i.perl;
    $i.lb = 6;     # should blow up!
    say $i.perl;
    
  2. or download this
    class Interval {
        has Real $.lb = die 'Lower bound is required';
    ...
            ($!lb, $!ub) = ($lb, $ub);
        }
    }
    
  3. or download this
    class Interval {
        has Real $.lb = die 'Lower bound is required';
    ...
            $!ub = $ub;
        }
    }