Hi List, from Emacs Lisp I know some special constructs for differenciating between types of function arguments, e.g.:
,------------------------------------------ | (defun foo (x y &optional z &rest r) ...) `------------------------------------------ When looking at the signature of e.g. the vi function in lib/debug.l: ,-------------------- | (de vi ("X" C) ...) `-------------------- and then in the doc: ,------------------------------------------------------------------------------ | (vi 'sym) -> sym | (vi 'sym 'cls) -> sym | (vi '(sym . cls)) -> sym | (vi) -> NIL | Opens the "vi" editor on the function or method definition of sym. A call | to ld thereafter will load the modified file. See also doc, edit, *Dbg, | debug and pp. | | : (vi 'url> '+CuSu) # Edit the method's source code, then exit from 'vi' | -> T `------------------------------------------------------------------------------ its a bit hard to relate the signature to the documentation. The chapter "Defining functions" in the PicoLisp tutorial (http://software-lab.de/doc/tut.html#fun) explains many ways (and tricks) how to define function args, but '(de vi ("X" C) ...)' looks to me like a list of two parameters - why can it be called with 0 to 2 parameters (apparently)? -- cheers, Thorsten -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe