How can I redefine the procedure and
only when it is called as an argument to the procedure fetch
?
For example:
; this `and` returns #f
(and #t #f)
; this `and` returns "and a b"
(fetch (foo (bar (and "a" "b"))))
I would like to write a macro to do this, but I can't work out how to write a pattern that matches and
anywhere in an arbitrary tree of arguments passed to fetch
.
I am using Chicken and am happy to use as much of R7RS as Chicken supports.