pull/2/head
Matthew Butterick 11 years ago
parent fe150173a4
commit b4e54b797c

@ -74,6 +74,6 @@
(define+provide (->boolean x) (define+provide (->boolean x)
(if x #t #f)) (and x #t))

@ -44,6 +44,6 @@
[(list? container) (member item container)] ; returns #f or sublist beginning with item [(list? container) (member item container)] ; returns #f or sublist beginning with item
[(vector? container) (member item (vector->list container))] ; returns #f or sublist beginning with item [(vector? container) (member item (vector->list container))] ; returns #f or sublist beginning with item
[(hash? container) (and (hash-has-key? container item) (get container item))] ; returns #f or hash value [(hash? container) (and (hash-has-key? container item) (get container item))] ; returns #f or hash value
[(string? container) (regexp-match (->string item) (->string container))] ; returns #f or substring beginning with item [(string? container) (regexp-match (->string item) container)] ; returns #f or substring beginning with item
[(symbol? container) ((->string item) . in? . (->string container))] ; returns #f or subsymbol (?!) beginning with item [(symbol? container) ((->string item) . in? . (->string container))] ; returns #f or subsymbol (?!) beginning with item
[else #f])) [else #f]))
Loading…
Cancel
Save