Alexander Burger <a...@software-lab.de> writes:

Hi Alex,

sorry for being thick as a brick ...

> Well, 'bind' is the evaluating version of 'let'. It could be used to
> implement the outher functions.

I'll check that out.

> What you probably mean is something different. It is a different way of
> interpreting the arguments to a function. It has nothing to do with how
> the symbols are bound, and nothing with the reader:

   (de g Args
      (glue " "
        (mapcar
           '((X)
              (if (pair X) (val (car X)) X) )
           Args ) ) )


   (setq Temp 33)

   (g Current \"temperature\" in Berlin is (Temp) °Celsius \(its really
   hot!\) )


-> "Current \"temperature\" in Berlin is 33 °Celsius (its really hot!)"

This comes pretty close to what I was looking for, thanks. The only
drawback is that normal parens (and double quotes) are very common in
text so a lot of escaping would be necessary. Something like this:

   (g Current "temperature" in Berlin is {Temp} \{°Celsius\} (its
   really hot!) )

resulting in:

-> "Current \"temperature\" in Berlin is 33 {°Celsius} (its really hot!)"

would be much more comfortable as syntax, but harder to implement.

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to