Sid
Sid

Reputation: 489

loading a file in lisp

Can anyone please tell me after compiling and loading a file do we still have to define the function(already in the file compiled and loaded) in repl to use it? or is there still process left so that the repl detects the function is already defined?

What is the significance of loading a file in lisp?

Thanks.

Upvotes: 1

Views: 158

Answers (1)

Paul Nathan
Paul Nathan

Reputation: 40299

If the file contents have been read in, then, assuming there have been no errors thrown, all the forms of the contents have been executed. If one of those is a DEFUN form, then the function will have been defined.

To be precise, examine the LOAD definition in the HyperSpec.

Upvotes: 4

Related Questions