update docs and add word/rec
This commit is contained in:
parent
b3d6503924
commit
aaa1131574
|
@ -121,13 +121,13 @@ for creations with complex control flow, because different sorts of
|
||||||
@tech{word}s can be returned in different circumstances.
|
@tech{word}s can be returned in different circumstances.
|
||||||
|
|
||||||
@defproc[(word [base (or/c #f word?) #f]
|
@defproc[(word [base (or/c #f word?) #f]
|
||||||
[fps real? ....]
|
[#:fps fps real? ....]
|
||||||
[label (or/c string? (-> real? string?)) ....]
|
[#:label label (or/c string? (-> real? string?)) ....]
|
||||||
[evt evt? ....]
|
[#:evt evt evt? ....]
|
||||||
[event (-> any/c (or/c #f word?)) ....]
|
[#:event event (-> any/c (or/c #f word?)) ....]
|
||||||
[tick (-> (or/c #f word?)) ....]
|
[#:tick tick (-> (or/c #f word?)) ....]
|
||||||
[output any/c ....]
|
[#:output output any/c ....]
|
||||||
[return any/c ....])
|
[#:return return any/c ....])
|
||||||
word?]{
|
word?]{
|
||||||
|
|
||||||
Return a @tech{word} where the implementations of the methods are as
|
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}
|
@subsection{Helpers}
|
||||||
|
|
||||||
@defproc[(lux-standard-label [s string?] [frame-time flonum?]) string?]{
|
@defproc[(lux-standard-label [s string?] [frame-time flonum?]) string?]{
|
||||||
|
|
4
word.rkt
4
word.rkt
|
@ -170,8 +170,12 @@
|
||||||
|
|
||||||
(chaos-swap! c (λ () (output&process-input&wait (current-inexact-milliseconds) w))))
|
(chaos-swap! c (λ () (output&process-input&wait (current-inexact-milliseconds) w))))
|
||||||
|
|
||||||
|
(define-syntax-rule (word/rec id . more)
|
||||||
|
(letrec ([id (word . more)]) id))
|
||||||
|
|
||||||
(provide
|
(provide
|
||||||
gen:word
|
gen:word
|
||||||
|
word/rec
|
||||||
(contract-out
|
(contract-out
|
||||||
[word?
|
[word?
|
||||||
(-> any/c word?)]
|
(-> any/c word?)]
|
||||||
|
|
Loading…
Reference in New Issue