Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add set-get-one' and set-get-one/rest' #65

Closed
wants to merge 2 commits into from
Closed

add set-get-one' and set-get-one/rest' #65

wants to merge 2 commits into from

Commits on Dec 9, 2011

  1. add set-get-one' and set-get-one/rest'

    The procedure `set-get-one/rest' returns a random element from the set and a new
    set with that element removed. It is not guaranteed to return the same element
    if it is called twice on the original set.
    
    The procedure `set-get-one' only returns a random element from the set. This can
    be used if the programmer simply needs some element from the set and is not
    iterating over the set.
    
    This was discussed here:
    http://lists.racket-lang.org/users/archive/2011-September/047919.html
    Daniel King committed Dec 9, 2011
    Configuration menu
    Copy the full SHA
    6fe5ba3 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2012

  1. Use `for/first' to access some element of the set. (presumably better…

    … performance)
    Daniel King committed Feb 1, 2012
    Configuration menu
    Copy the full SHA
    cb4f48e View commit details
    Browse the repository at this point in the history