Skip to content

Exercises of the book "The little schemer" in emacs lisp language

Notifications You must be signed in to change notification settings

Nicerova7/Emacslisp-the-little-schemer

Repository files navigation

The little schemer

in emacs lisp

"Thinking about computing is one of the most exciting things the human mind can do".

The Little Schemer is worthy successor and will prove equally popular as texbooks for Scheme courses as well as companion texts for any complete introductory course in Computer Science.

About

Here is the emacs lisp style guide

;; good
(format "%s %d"
	    something
	    something-else)

;; bad
(format "%s %d"
something
something-else)

The five Rules

We must take into account each of these laws to be clear what each function returns, that we can resume or reuse of each output of a function and how to redefine new functions.

The Law of Car

The primitive car is defined only for non-empty lists.

Violating the law we will not find any answer.

The Law of Cdr

The primitive cdr is defined only for non-empty lists. The cdr of any non-empty lists is always another list.

So taking into account the first law we can combine cdr with car.

(car (cdr () ))

(cdr (car () ))

The Law of Cons

The primitive cons takes two arguments. The second argument to cons must be a list. The result is a list.

We can concatenate.

(cons () (cons () ()) )

The Law of Null?

The primitive null? (null in emacs lisp) is defined only for lists.

For other cases we will define a function.

The Law of Eq?

The primitive eq? takes two arguments. Each must be a non-numeric atom.

For other cases we will define a function.

Find book here

My_little_Schemer

Reviews

"I learned more about LISP from this book than I have from any of the other LISP books I've read over the years... While other books will tell you the mechanis of LISP, they can leave you largely uninformed on the style of problem-solving for which LISP is optimized." --Gregg Williams , byte.

About

Exercises of the book "The little schemer" in emacs lisp language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published