So how does evaluation work here? Why isn't (1 2 3) evaluated? Or is it not evaluated because 1 is not a function? In which case, is it not possible to create a literal list where the first element is a function?
So how does evaluation work here? Why isn't (1 2 3) evaluated? Or is it not evaluated because 1 is not a function? In which case, is it not possible to create a literal list where the first element is a function?
> [...] as a special case - if the CAR of the list is a number, the whole list is returned as it is [...] This is not really a function call but just a convenience to avoid having to quote simple data lists.
Picolisp has a special rule for (literal) lists starting with a (literal) number, they're implicitly quoted instead of the CAR being interpreted as a function:
> if the CAR of the list is a number, the whole list is returned as it is
This makes more sense considering a second quirk of Picolisp: numbers can be used as functions, in which case they're interpreted as a pointer to the executable code to run.
And from what I understand Picolisp's execution model doesn't have special forms as such, rather function definition specifies whether they receive their arguments evaluated or not.