Playing with infinity - Lazy arithmetics
Many modern programming languages allow us to handle potentially infinite lists and to perform certain operations on them. Example [Python]: EvenSquareNumbers = ( x * x for x in naturals() if x mod 2 == 0 ) Such lists can exist because only elements that are actually required are computed. (Lazy evaluation) I just wondered out of interest whether it's possible (or even practised in certain languages) to extend the mechanism of lazy evaluation to arithmetics. Example: Given the infinite list of even numbers evens = [ x | x <- [1..], even x ] We couldn't compute length evens since the