Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What makes Lisp...Lisp?

Name: Anonymous 2009-09-10 1:29

If you starting removing features from Lisp, at what point is it no longer Lisp? Some people claim Clojure shouldn't be considered a Lisp. Is it because too much Lisp was removed?

What is at the very heart of Lisp that makes it Lisp?

Name: bbcode failure fixed 2009-09-10 11:44

>>32
First, lists in Lisp are usually linked lists, if you were to write it in C, you'd need to do something like:

struct cons
{
    void* car;
    void* cdr;
}

A lisp list is made by chaining conses, like:

(cons 'a (cons 'b (cons 'c nil)));=> '(a b c)

The last element is a NIL, or the empty list '().
NIL is not necessarily conflated with the value of 0.

tl;dr: you don't need the size argument.

The arguments to MAPCAR are:

(mapcar function list &rest more-lists)

MAPCAR can take a variable number of arguments(lists).
The function that you can pass to it can be any function object, such as a closure, which can be bound over some values, at the same time it could take dynamic value from the environment, and other fancy things which are just not so easy to implement elegantly in C. Yes, you can do any of them, but it would either look very hacky, or somewhat bloated.
The types of the elements in the list(s) can be anything.
The values returned by calling the function can be anything.

For more information about MAPCAR:
http://www.lispworks.com/documentation/HyperSpec/Body/f_mapc_.htm

I could go on, but there's too much too explain. Why don't you try studying this for yourself before you write off Lisp as "easily done in C".

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List