{"size": 814, "ext": "scrbl", "max_stars_repo_path": "rec-contract/rec-contract.scrbl", "max_stars_repo_name": "maueroats/syntax-parse-example", "max_stars_repo_stars_event_min_datetime": "2017-05-18T22:15:56.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-17T13:13:05.000Z", "max_issues_repo_path": "rec-contract/rec-contract.scrbl", "max_issues_repo_name": "maueroats/syntax-parse-example", "max_issues_repo_issues_event_min_datetime": "2017-05-18T22:54:53.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-19T02:58:50.000Z", "max_forks_repo_path": "rec-contract/rec-contract.scrbl", "max_forks_repo_name": "maueroats/syntax-parse-example", "max_forks_repo_forks_event_min_datetime": "2017-05-19T14:27:57.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-30T09:36:54.000Z"}
{"max_stars_count": 22, "max_issues_count": 20, "max_forks_count": 6, "avg_line_length": 26.2580645161, "max_line_length": 102, "alphanum_fraction": 0.6081081081}
#lang syntax-parse-example
@require[
  (for-label racket/base syntax/parse racket/contract syntax-parse-example/rec-contract/rec-contract)]

@(define rec-contract-eval
   (make-base-eval '(require racket/contract syntax-parse-example/rec-contract/rec-contract)))

@title{@tt{rec/c}}

@; =============================================================================

@defmodule[syntax-parse-example/rec-contract/rec-contract]{}

@defform[(rec/c id expr)]{

  The @racket[rec/c] macro uses Racket's @racket[recursive-contract] form
   to create anonymous recursive contracts.

  @racketfile{rec-contract.rkt}

  @examples[#:eval rec-contract-eval
    (define/contract (deep n)
      (-> integer? (rec/c t (or/c integer? (list/c t))))
      (if (zero? n)
        n
        (list (deep (- n 1)))))

    (deep 4)
  ]
}
