Hi Bruno,

> If you want
> (match '(@A (chop varstring) @B) description)
> to match
> (match '(@A "C" "I" "T" "Y" @B) description)
> you'll have to add a tilde before chop, like this:
> (match '(@A ~(chop varstring) @B) description)

Yes, but this only works if the value of 'varstring' is constant.

> That said, do you think you could keep "CITY" intact inside the list,
> without cutting it into
> its letters? I mean, would
> (match '(@A "CITY" @B) description)
> work for what you want to do?

No, it matches the symbol "CITY". Would succeed if you call

   (match '(@A "CITY" @B) '("a" "b" "CITY" "c" "d"))

but not

   (match '(@A "CITY" @B) '("a" "b" "C" "I" "T" "Y" "c" "d"))

> Because if it does, then you can write:
>   (setq varstring "CITY")
>   (match '(@A varstring @B) description)
> which is much simpler than the first solution I gave.

No, this won't work either. As the quoted list is not evaluated, it tries to
match the *atom* 'varstring' which will not be helpful.

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

Reply via email to