{"size": 1350, "ext": "scrbl", "max_stars_repo_path": "private/generative-token.scrbl", "max_stars_repo_name": "dys-bigwig/rebellion", "max_stars_repo_stars_event_min_datetime": "2019-05-28T21:50:27.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-17T21:21:52.000Z", "max_issues_repo_path": "private/generative-token.scrbl", "max_issues_repo_name": "dys-bigwig/rebellion", "max_issues_repo_issues_event_min_datetime": "2019-03-02T23:19:07.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-24T08:43:16.000Z", "max_forks_repo_path": "private/generative-token.scrbl", "max_forks_repo_name": "dys-bigwig/rebellion", "max_forks_repo_forks_event_min_datetime": "2019-02-01T22:21:26.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-24T04:35:35.000Z"}
{"max_stars_count": 73, "max_issues_count": 216, "max_forks_count": 20, "avg_line_length": 35.5263157895, "max_line_length": 80, "alphanum_fraction": 0.7222222222}
#lang scribble/manual

@(require (for-label racket/base
                     racket/contract/base
                     rebellion/base/generative-token)
          (submod rebellion/private/scribble-evaluator-factory doc)
          scribble/example)

@(define make-evaluator
   (make-module-sharing-evaluator-factory
    #:public (list 'rebellion/base/generative-token)
    #:private (list 'racket/base)))

@title{Generative Tokens}
@defmodule[rebellion/base/generative-token]

A @deftech{generative token} is a primitive data type for unique objects. Two
generative tokens are only @racket[equal?] if they are @racket[eq?], and the
constructor @racket[make-generative-token] always creates a new token that is
not @racket[eq?] to any other token. Tokens contain no other data --- their only
use is as a building block for creating other, more complex generative data
types.

@defproc[(generative-token? [v any/c]) boolean?]{
 A predicate for @tech{generative tokens}.}

@defproc[(make-generative-token) generative-token?]{
 Constructs a new @tech{generative token} that is distinct from all other
 tokens. Multiple calls to @racket[make-generative-token] always yield multiple
 distinct tokens.

 @(examples
   #:eval (make-evaluator) #:once
   (define tok (make-generative-token))
   tok
   (equal? tok tok)
   (equal? tok (make-generative-token)))}
