unnecessary predicate

pull/23/head
Matthew Butterick 4 years ago
parent 6ec0d25f5d
commit 1f571fc8de

@ -5,11 +5,10 @@
(require rackunit))
(define (jsonic-token? x)
(or (eof-object? x) (string? x) (token-struct? x)))
(or (eof-object? x) (token-struct? x)))
(module+ test
(check-true (jsonic-token? eof))
(check-true (jsonic-token? "a string"))
(check-true (jsonic-token? (token 'A-TOKEN-STRUCT "hi")))
(check-false (jsonic-token? 42)))

@ -5,11 +5,10 @@
(require rackunit))
(define (token? x)
(or (eof-object? x) (string? x) (token-struct? x)))
(or (eof-object? x) (token-struct? x)))
(module+ test
(check-true (token? eof))
(check-true (token? "a string"))
(check-true (token? (token 'A-TOKEN-STRUCT "hi")))
(check-false (token? 42)))

Loading…
Cancel
Save