I wrote two functions in two separated files, assumed to be file A.lisp and B.lisp, where both files have some main program code for test and A.lisp would call the function in B.lisp. This means using the load
method directly in A.lisp would execute the main code in B.lisp, which is not supposed to happen. And these files are, in my opinion, too small to be considered using something like package.
Is there anything like Python's if __name__ == "__main__":
stuff in Common Lisp? Top-level code that's wrapped inside this condition will only be executed if the current file is the main module, i.e. the running program, but not if it's imported as a library.