Browse Source

update docs and add word/rec

master
Jay McCarthy 1 year ago
parent
commit
aaa1131574
2 changed files with 13 additions and 7 deletions
  1. +9
    -7
      scribblings/lux.scrbl
  2. +4
    -0
      word.rkt

+ 9
- 7
scribblings/lux.scrbl 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?]{


+ 4
- 0
word.rkt 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?)]


Loading…
Cancel
Save