On Thu, Oct 11, 2012 at 9:29 PM, John Boyle <johnthescavenger@x> wrote:This is somewhat off-topic for the formal comment, but it's quite easy
> While all Schemes I've tested that support define-syntax do allow
> redefinition of "if"... on Racket, it does not play well with low-level
> macros (using datum->syntax, or the "mzlib/defmacro" library) due to their
> phase-separation.
to do this in Racket:
#lang racket ;; https://gist.github.com/3876906
(require syntax/parse/define)
(define-simple-macro (if (~seq test result) ... final)
(cond [test result] ... [else final]))
(if (even? 7) "seven" (odd? 8) "eight" "neither")
I'm not sure what difficulty you ran into, but it shouldn't be
necessary to use `datum->syntax`, `defmacro`, or any other low-level
features.
--
sam th
samth@x
_______________________________________________ Scheme-reports mailing list Scheme-reports@x http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports