I am trying to learn how to write Macros in Racket. I've gone through the excellent Fear of Macros tutorial and am now trying to experiment with the basic ideas.
So I defined my-if slightly differently from what was shown in the tutorial, and I am getting an error define-values: unbound identifier; in:
#lang racket/base
(define-syntax (my-if stx)
(define-values (_ condition yes no)
(apply values (syntax->list stx)))
(datum->syntax stx `(if ,condition ,yes ,no)))
If I use #lang racket instead of racket/base it works.
Looking up the definition of define-values in the Manual, it seems to be part of racket/base!
define-values provided from racket/base, racket
So why is Racket complaining about this?