Re: [racket-dev] set operations

2010-11-11 Thread Jay McCarthy
I think it is a good idea. Any objectors? Jay On Wed, Nov 10, 2010 at 12:40 PM, David Van Horn dvanh...@ccs.neu.edu wrote: The set library is missing a convenient way of selecting an element from a set, making it hard to write recursive functions matching the inductive structure of a set.

Re: [racket-dev] set operations

2010-11-11 Thread Neil Toronto
I've written a version of `set-choose', and also `set-first' and `set-rest' (with the obvious meanings) a few times. They can be useful. (I always waffled about whether to use just `set-choose', or `set-first' along with `set-rest'. Mathematically, `set-first' and `set-rest' don't make sense,

[racket-dev] set operations

2010-11-10 Thread David Van Horn
The set library is missing a convenient way of selecting an element from a set, making it hard to write recursive functions matching the inductive structure of a set. Could you add this function, or something like it? (define (set-choose s) (let ((x (for/first ([x (in-set s)])