Hello guys. Welcome to my first post. Here I will tell you about learning recursion, especially in LISP.
The first I will tell you about atom and list.
1. ATOM
Like as in natural science, ATOM is the smallest part of a thing. In LISP, the example for LISP is like 1, 2, 3, and so on. If you want to check, you can write
(atom 1)
(atom 2)
and so on.
If it is atom, it will produce T (true) like as picture below
2. List
List is some atoms that combine into a list. For example
(1 2 3 4) ==> Atom 1, 2, 3, 4 combine into one element, list.
Some method to make list:
To check if your input is list, you can use listp like picture below



No comments:
Post a Comment