update docs and add word/rec

This commit is contained in:
Jay McCarthy 2019-07-12 17:28:08 -06:00
parent b3d6503924
commit aaa1131574
2 changed files with 13 additions and 7 deletions

View File

@ -121,13 +121,13 @@ for creations with complex control flow, because different sorts of
@tech{word}s can be returned in different circumstances.
@defproc[(word [base (or/c #f word?) #f]
[fps real? ....]
[label (or/c string? (-> real? string?)) ....]
[evt evt? ....]
[event (-> any/c (or/c #f word?)) ....]
[tick (-> (or/c #f word?)) ....]
[output any/c ....]
[return any/c ....])
[#:fps fps real? ....]
[#:label label (or/c string? (-> real? string?)) ....]
[#:evt evt evt? ....]
[#:event event (-> any/c (or/c #f word?)) ....]
[#:tick tick (-> (or/c #f word?)) ....]
[#:output output any/c ....]
[#:return return any/c ....])
word?]{
Return a @tech{word} where the implementations of the methods are as
@ -141,6 +141,8 @@ be captured by these closures if necessary.
}
@defform[(word/rec x:id word-args ...)]{Expands to @racket[(letrec ([x (word word-args ...)]) x)].}
@subsection{Helpers}
@defproc[(lux-standard-label [s string?] [frame-time flonum?]) string?]{

View File

@ -170,8 +170,12 @@
(chaos-swap! c (λ () (output&process-input&wait (current-inexact-milliseconds) w))))
(define-syntax-rule (word/rec id . more)
(letrec ([id (word . more)]) id))
(provide
gen:word
word/rec
(contract-out
[word?
(-> any/c word?)]