Code: Select all
(context 'C)
(define (f x y (mode 'black))
(cond
((= mode 'blue)
(+ x y))
((= mode 'white)
(- x y))
(true
0)))
(context MAIN)
(C:f 1 2 'white)
What's the best (fastest, safest, clearest) way to get this to work:
- declare the symbols to be global
- use strings instead of symbols
- use 'C:white rather than 'white in the function call
- in the context, refer to MAIN:white (but I don't always want to call it from the MAIN context ...)