Adding documentation

This commit is contained in:
Jay McCarthy 2014-11-17 23:04:46 -05:00
parent 1b2c8ef2ef
commit 8a9b9c006f
2 changed files with 12 additions and 7 deletions

View File

@ -25,3 +25,4 @@ This manual documents data structure libraries available in the
@include-section["integer-set.scrbl"]
@include-section["bit-vector.scrbl"]
@include-section["union-find.scrbl"]
@include-section["enumerate.scrbl"]

View File

@ -23,6 +23,12 @@
(provide
(contract-out
[nat?
(-> any/c
boolean?)]
[extended-nat?
(-> any/c
boolean?)]
[enum
(-> extended-nat? (-> nat? any/c) (-> any/c nat?)
enum?)]
@ -72,11 +78,8 @@
[const/e
(-> any/c
enum?)]
[from-list/e
(-> list?
enum?)]
[fin/e
(-> list?
(->* () #:rest list?
enum?)]
[nat/e enum?]
[int/e enum?]
@ -84,7 +87,8 @@
(->* () #:rest (listof (cons/c enum? (-> any/c boolean?)))
enum?)]
[disj-append/e
(->* (enum?) #:rest (listof (cons/c enum? (-> any/c boolean?)))
(->* ((cons/c enum? (-> any/c boolean?)))
#:rest (listof (cons/c enum? (-> any/c boolean?)))
enum?)]
[fin-cons/e
(-> enum? enum?
@ -236,8 +240,8 @@
es/e)]))
;; filter/e : enum a, (a -> bool) -> enum a
;; size won't be accurate!
;; encode is not accurate right now!
;; xxx size won't be accurate!
;; xxx encode is not accurate right now!
(define (filter/e e p)
(enum (size e)
(λ (n)