I define a package
[10]> (defpackage :abc)
#<PACKAGE ABC>
[11]>
I use that package
[15]> (in-package :abc)
#<PACKAGE ABC>
ABC[16]>
How to exit ABC[16] to [17] ?
Thank you~
Strictly speaking you don't use the package with in-package
but you
set the current package. To use a package you've to use use-package
.
Back to your problem, you've defined a new package (without using :cl
so you'll have to use (cl:+ 1 2)
to do an addition) and set it as
the current package. COMMON-LISP-USER
a.k.a. CL-USER
is the
current package when you start your lisp system, thus to have it back
you just have to do (cl:in-package :cl-user)
.
Here is a nice tutorial on packages in Common Lisp. This chapter in PCL is also very good. But the reference is still the CLHS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With