Hi Lindsay,

> I still confuse instances of when CARs and arguments in
> general are, or not, evaluated.

True, this is often not obvious.

You surely know that the references show it by marking evaluated
arguments with a quote, e.g.

   : (help 'case)
   ========================================
   (case 'any (any1 . prg1) (any2 . prg2) ..) -> any
   ...

as opposed to

   : (help 'cond)
   ========================================
   (cond ('any1 . prg1) ('any2 . prg2) ..) -> any
   ...

"'any1" means that this datum is evaluated and can be anything (number,
symbol or list).


> 'sp?' I didn't use here because I wasn't sure what it considers white space
> and I just wanted to match the set defined in the json spec.

OK, then an explicit check is more correct. 'sp?' takes all ASCII
characters 1 .. 32 as white space.


BTW, in the 'seek' example

   (seek '(((C)) (not (sp? C))) Lst)

it may not be obvious that it uses destructuring bind. 'seek' always
gets the full (rest)list as argument, so the example could also be
written as

   (seek '((L) (not (sp? (car L)))) Lst)

☺/ A!ex

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

Reply via email to