[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make-rational-number-generator

This page is part of the web mail archives of SRFI 121 from before July 7th, 2015. The new archives for SRFI 121 contain all messages, not just those from before July 7th, 2015.

Arthur A. Gleckler scripsit:

> This doesn't seem to be useful enough to warrant inclusion in a general
> library.  Do you have some general class of applications in mind?

It's the rational-number analogue of iota.  It's not as intuitive an
ordering as 1, 2, 3, 4, ... and can't be used for indexing, but it
does traverse the whole (non-negative) set of rational numbers.
The particulars of the ordering are nothing special, except that
they require only a single item of state, the last rational number
generated, and there is a once-and-only-once guarantee.

John Cowan          http://www.ccil.org/~cowan        cowan@xxxxxxxx
I suggest you solicit aid of my followers or learn the difficult art
of mud-breathing.  --Great-Souled Sam