I have a file, test.lisp that is essentially this:
(load (compile-file "init.lisp"))
(my-funcA 2 3)
(my-funcB 4 5)
; bunch more lines like the last ones
Inside the init.lisp file i would like to be able to read the lines (my-funcA 2 3), (my-funcB 4 5), etc., and do stuff with it. Is this possible?
I've tried to use:
(let ((input (read)))
; do stuff here
)
inside the init.lisp file, but this just keeps waiting for input from the keybord, and doesn't read from the file that is loading. Any help would be much appreciated!
LOAD
doesn't bind*STANDARD-INPUT*
(or any other standard stream variable) to the file it's loading, so you need to do that yourself.However, this seems like a strange way to do things. Why not just define a function in
init.lisp
, and call it: