correct missing `datum?`

pull/13/merge
Matthew Butterick 7 years ago
parent 8000d41389
commit 0af8f1aeeb

@ -1,5 +1,5 @@
#lang racket/base #lang racket/base
(provide format-datum format-datums) (provide format-datum format-datums datum?)
(define (blank? str) (define (blank? str)
(for/and ([c (in-string str)]) (for/and ([c (in-string str)])

@ -66,9 +66,9 @@ When I use ``datum'' in its specific Racket sense, I use ``datums'' as its plura
@defproc[ @defproc[
(format-datum (format-datum
[datum-form (or/c list? symbol?)] [datum-form datum?]
[val any/c?] ...) [val any/c?] ...)
(or/c list? symbol?)]{ (or/c datum? void?)]{
Similar to @racket[format], but the template @racket[datum-form] is a datum, rather than a string, and the function returns a datum, rather than a string. Otherwise, the same formatting escapes can be used in the template (see @racket[fprintf]). Similar to @racket[format], but the template @racket[datum-form] is a datum, rather than a string, and the function returns a datum, rather than a string. Otherwise, the same formatting escapes can be used in the template (see @racket[fprintf]).
Two special cases. First, a string that describes a list of datums is parenthesized so the result is a single datum. Second, an empty string returns @racket[void] (not @racket[#f], because that's a legitimate datum). Two special cases. First, a string that describes a list of datums is parenthesized so the result is a single datum. Second, an empty string returns @racket[void] (not @racket[#f], because that's a legitimate datum).

Loading…
Cancel
Save