>   @u = [..];    # @a contains the univeral set
> works just fine, so I can then say:
>   @i = grep {$_=abs($_)} @u;    # @i contains the integers
>   # See higher-order function and multi-way comparison RFCs
>   $s = sum (grep 0<__<=100 @i);
>   print "The sum of the 1st 100 integers is: $s";
>

Oops, a correction. [..] should mean 'the set of all integers'. _Not_ the
univeral set. So my code snippet should be:
  @i = [..];    # @i contains the integers
  $s = sum (grep 0<__<=100 @i);
  print "The sum of the 1st 100 integers is: $s";

I still think it would be cool to be able to specify other infinite sets
somehow (with rationals, with complex, etc) but [..] isn't the right way.
Sorry about that.


Reply via email to