samohtvii wrote:So i have
1 - (defparameter *s* (open animals))
Then i get kinda lost.
2 - (read *s*) ???
so far my file animals has "((Emu)(Dog Beaver))"
The effect of reading an expression from a file is basically equivalent to what you would obtain by quoting the expression.
(defparameter *s* '((Emu)(Dog Beaver)) )
*s* ==> ((EMU)(DOG BEAVER))
(car *s*) ==> (EMU)
(cadr *s*) ==> (DOG BEAVER)
(caar *s*) ==> EMU
(cadadr *s*) ==> BEAVER
Note: If you wish to retain the original case of the symbols, you should set your readtable appropriately.