Code: Select all
(context 'TEST0)
(define (TEST0:foo)
(println "hi there from TEST0:foo"))
(define (TEST0:bar)
(println "hi there from TEST0:bar"))
(context 'TEST1)
(define (TEST1:foo)
(println "hi there from TEST1:foo"))
(define (TEST1:bar)
(println "hi there from TEST1:bar"))
(context 'TEST2)
(define (TEST2:foo)
(println "hi there from TEST2:foo"))
(define (TEST2:bar)
(println "hi there from TEST2:bar"))
(context MAIN)
(set 'contexts '(TEST0 TEST1 TEST2))
(set 'functions '({foo} {bar}))
(dolist (c contexts)
(map (fn (f) (eval (sym f c))) functions) ; <- doesn't do what I thought it might :-)
)