Modes as function parameters?

Subject: Modes as function parameters?
From: Jon Haugsand <Jon.Haugsand@xxxxx>
Date: 28 Jan 1999 14:49:09 +0100
I typically have functions like the following:


... (make sequence
          (my-para "Green objects: " par2 par3 mode-green)
          (my-para "Red objects: " par2 par3 mode-red)
          (my-para "Blue objects: " par2 par3 mode-blue)) ...

(mode mode-green ( ..... ))
(mode mode-red ( ..... ))
(mode mode-blue ( ..... ))

 
(define (my-para txt p1 p2 my-mode)
        ( .......  (with-mode my-mode (.....))))

However, this does not work as there is no "my-mode". Why aren't those
modes ordinary lisp symbols? Is there any way to transfer a mode as a
parameter or do I have to make my own mapping function (e.g. using a
"cond" construct)?

-- 
Jon Haugsand
  Norwegian Computing Center, <http://www.nr.no/engelsk/> 
  <mailto:haugsand@xxxxx>  Pho: +47 22852608 / +47 22852500, 
  Fax: +47 22697660, Pb 114 Blindern, N-0314 OSLO, Norway


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread