Hi Jon,

> : (be boy (alex))
> -> boy
> ...
> : (be girl (diana))
> -> girl
> ...
> : (be boy (eddy))
> -> boy

I'm not sure if this is documented in the references, but whenever 'be'
detects a new 'sym' clause, it considers the previous rules to be

This, when 'be boy' after 'be girl' is seen, the rules for 'boy' are
started from scratch.

The reason for this is to allow such 'be' definitions put into a file,
which may be reloaded at any time. If the rules wouldn't start anew,
clauses would be added again and again.

Originally, before I implemented this behavior, I had a clause 'forget'
to clean up things. With that, you would need to write

   (forget 'boy)
   (be 'boy ...)
   (be 'boy ...)

   (forget 'girl)
   (be 'girl ...)

With this you could reload the file, but I found it ugly and verbose to
put a 'forget' before each new group of definitions.

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

Reply via email to