document undocumented exports (unstable)

This commit is contained in:
Ryan Culpepper 2011-04-25 21:51:57 -06:00
parent ee6fa14ec4
commit cd108c6c00
3 changed files with 51 additions and 2 deletions

View File

@ -33,7 +33,7 @@
prefix))
(define (drop-common-prefix as bs #:same? [same? equal?])
(let-values ([(atail btail) (internal-split-common-prefix as bs same? #f)])
(let-values ([(prefix atail btail) (internal-split-common-prefix as bs same? #f)])
(values atail btail)))
(provide/contract

View File

@ -9,7 +9,7 @@
@title[#:tag "class-iop"]{Interface-Oriented Programming for Classes}
@(define the-eval (make-base-eval))
@(the-eval '(require racket/class unstable/class-iop))
@(the-eval '(require racket/class unstable/class-iop (for-syntax racket/base)))
@defmodule[unstable/class-iop]
@ -127,4 +127,18 @@ should be fixed.
}
@defform[(define-interface-expander id transformer-expr)]{
Defines @racket[id] as a macro that can be used within
@racket[define-interface] forms.
@examples[#:eval the-eval
(define-interface-expander stack-methods
(lambda (stx) #'[empty? push pop]))
(define-interface stack<%> ()
((stack-methods)))
(interface->method-names stack<%>)
]
}
@close-eval[the-eval]

View File

@ -27,6 +27,41 @@
]
}
@defproc[(take-common-prefix [l list?] [r list?]
[#:same? same? equal?])
list?]{
Returns the longest common prefix of @racket[l] and @racket[r].
@examples[#:eval the-eval
(take-common-prefix '(a b c d) '(a b x y z))
]
}
@defproc[(drop-common-prefix [l list?] [r list?]
[#:same same? equal?])
(values list? list?)]{
Returns the tails of @racket[l] and @racket[r] with the common
prefix removed.
@examples[#:eval the-eval
(drop-common-prefix '(a b c d) '(a b x y z))
]
}
@defproc[(split-common-prefix [l list?] [r list?]
[#:same? same? equal?])
(values list? list? list?)]{
Returns the longest common prefix together with the tails of
@racket[l] and @racket[r] with the common prefix removed.
@examples[#:eval the-eval
(split-common-prefix '(a b c d) '(a b x y z))
]
}
@addition{Sam Tobin-Hochstadt}
@defproc[(filter-multiple [l list?] [f procedure?] ...) (values list? ...)]{