anaphoric/aand.rkt
Georges Dupéron 4bb11cb8f6 Add aand
2018-01-27 12:04:17 +01:00

15 lines
329 B
Racket

#lang racket/base
(provide aand it)
(require anaphoric/it
anaphoric/aif
syntax/parse/define
(for-syntax racket/base))
(define-syntax aand
(syntax-parser
[(_) #'#true]
[(_ body:expr) #'body]
[(_ [variable:id condition:expr] rest ...+)
#'(aif condition (and-let rest ...) #false)]))