Hi Manuel,
> I'm trying to create a function to define functions with a documentation
> string like emacs "defun". I'm trying something like this:
>
> (de defun P
> (def (car P) ...
>
> So the car of P is de function name, but it doesn't works as expected.
You may try this:
(de defun P
(put (car P) 'doc (caddr P))
(def (car P) (cons (cadr P) (cdddr P))) )
Then:
: (defun thefunc (A B C)
"This is the help text"
(* A B C) )
-> thefunc
: (pp 'thefunc)
(de thefunc (A B C)
(* A B C) )
-> thefunc
: (get 'thefunc 'doc)
-> "This is the help text"
♪♫ Alex
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe