accessing first element of lisp function directory



>>>>> "Edwin" == Edwin Woollett <woollett at charter.net> writes:

    Edwin> The output of ?directory(path) is not a list. I am
    Edwin> able to access all of the elements except the first.
    Edwin> How can I access the first element?

That's because cl:directory produces a Lisp list, not a Maxima list.
The main difference is that a Maxima list looks like '((mlist) l1 l2
l3 ...)

I think the easiest way would be to create your own Lisp function to
return a maxima list.  Something like:

:lisp (defun $directory (path) (list* '(mlist) (directory path)))

Then directory("foo") will return a normal Maxima list.

Note that cl:directory is notoriously implmentation-dependent; the
results can be very different depending on the Lisp being used.

Ray