Meta tags:
Headings (most frequently used words):
edit, and, expressions, dialects, lists, language, systems, navigation, to, list, structure, print, tools, lisp, programming, contents, history, major, innovations, syntax, semantics, examples, object, operating, see, also, references, further, reading, external, links, menu, timeline, connection, artificial, intelligence, genealogy, variants, 2000, present, standardized, symbolic, operators, lambda, function, definition, atoms, conses, self, evaluating, forms, quoting, scope, closure, of, program, code, exploitation, by, macros, compilers, evaluation, the, read, eval, loop, control, structures, personal, namespaces, views, search, contribute, export, in, other, projects, languages, historically, significant, represent, processing, procedures, shared,
Text of the page (most frequently used words):
the (506), lisp (386), and (250), common (109), for (95), list (94), language (71), scheme (69), with (67), that (56), are (55), this (54), #programming (53), from (51), expressions (47), was (46), languages (44), retrieved (44), lists (42), function (42), which (40), code (38), can (36), edit (34), data (30), mccarthy (30), object (29), history (28), not (28), functions (28), other (27), new (27), has (27), expression (27), system (26), systems (26), dialects (26), first (25), cons (25), computer (24), used (24), such (24), foo (24), mit (23), structure (23), its (23), one (23), more (22), machine (22), using (21), use (21), many (21), original (20), but (20), evaluates (20), 2022 (19), standard (19), written (19), may (18), archived (18), also (18), arguments (18), pdf (17), articles (17), implementation (17), maclisp (17), structures (17), have (17), ansi (17), program (17), same (17), most (17), 2013 (16), clojure (16), implementations (16), two (16), operators (16), car (16), read (15), value (15), nil (15), loop (15), lambda (15), then (15), later (15), dialect (15), special (14), example (14), john (14), eval (14), called (14), because (14), developed (14), macro (14), tail (14), number (14), symbol (14), functional (13), interlisp (13), time (13), style (13), notation (13), macros (13), evaluated (13), print (12), syntax (12), org (12), artificial (12), intelligence (12), compiler (12), recursion (12), linked (12), than (12), would (12), were (12), all (11), control (11), programs (11), only (11), cdr (11), interpreter (11), been (11), however (11), implemented (11), operator (11), name (11), links (10), simple (10), based (10), paul (10), science (10), emacs (10), isbn (10), instance (10), there (10), both (10), defun (10), several (10), into (10), some (10), output (10), argument (10), bar (10), wikipedia (9), different (9), 1958 (9), operating (9), franz (9), including (9), where (9), form (9), uses (9), programmers (9), part (9), elements (9), result (9), three (9), any (9), returns (9), version (8), identifiers (8), statements (8), created (8), java (8), algol (8), guy (8), steele (8), richard (8), graham (8), oriented (8), order (8), dynamic (8), features (8), over (8), acm (8), 2006 (8), evaluation (8), will (8), their (8), manual (8), named (8), each (8), processing (8), these (8), thus (8), about (7), non (7), community (7), project (7), 2010 (7), short (7), smalltalk (7), fortran (7), garbage (7), sussman (7), daniel (7), russell (7), levin (7), hart (7), gnu (7), standardized (7), self (7), research (7), compiled (7), see (7), march (7), quote (7), represent (7), types (7), them (7), very (7), made (7), iso (7), pdp (7), early (7), originally (7), built (7), does (7), like (7), often (7), equivalent (7), type (7), setf (7), destructive (7), source (7), conses (7), atoms (7), information (6), article (6), create (6), description (6), family (6), libraries (6), python (6), basic (6), collection (6), david (6), technology (6), design (6), zetalisp (6), islisp (6), development (6), programmer (6), 2020 (6), multiple (6), makes (6), 2012 (6), set (6), ieee (6), influenced (6), symbolic (6), had (6), return (6), factorial (6), examples (6), evaluate (6), given (6), needed (6), allows (6), support (6), call (6), major (6), calls (6), way (6), since (6), when (6), embedded (6), forms (6), values (6), variable (6), atom (6), could (6), parentheses (6), designed (6), inc (5), page (5), wikidata (5), contents (5), 2008 (5), february (5), wayback (5), space (5), gerald (5), jay (5), steve (5), berkeley (5), university (5), stanford (5), massachusetts (5), institute (5), symbolics (5), autolisp (5), racket (5), flavors (5), higher (5), general (5), purpose (5), applications (5), second (5), august (5), register (5), github (5), 2021 (5), open (5), iteration (5), circular (5), without (5), defined (5), much (5), paper (5), 1990 (5), full (5), december (5), 2007 (5), contrast (5), takes (5), continuations (5), still (5), while (5), between (5), procedure (5), they (5), compile (5), few (5), repl (5), provides (5), line (5), user (5), string (5), run (5), inheritance (5), respectively (5), another (5), introduced (5), arg (5), available (4), under (4), october (4), projects (4), item (4), pages (4), file (4), related (4), changes (4), here (4), recent (4), fast (4), sister (4), haskell (4), assembly (4), timeline (4), gabriel (4), mike (4), timothy (4), laboratory (4), interpretation (4), how (4), x3j13 (4), standards (4), genera (4), interface (4), spice (4), portable (4), picolisp (4), newlisp (4), lfe (4), lelisp (4), engineering (4), environment (4), eulisp (4), arc (4), goal (4), clos (4), his (4), work (4), peter (4), conference (4), european (4), stack (4), 1979 (4), 2nd (4), further (4), interim (4), alan (4), represented (4), cell (4), process (4), conditional (4), ibm (4), 704 (4), during (4), summer (4), 1956 (4), 2019 (4), compatibility (4), iec (4), 13816 (4), edwards (4), 1962 (4), define (4), bit (4), having (4), recursive (4), complex (4), zero (4), julia (4), etc (4), machines (4), 1994 (4), various (4), express (4), pair (4), either (4), imperative (4), ways (4), reason (4), definition (4), optimization (4), usually (4), implement (4), 123 (4), names (4), note (4), internal (4), table (4), present (4), include (4), within (4), symbols (4), lexical (4), scoping (4), quoted (4), third (4), evaluating (4), goose (4), after (4), element (4), proper (4), points (4), citation (4), meta (4), popular (4), years (4), widely (4), 2000 (4), terms (3), you (3), commons (3), last (3), english (3), cite (3), help (3), main (3), navigation (3), unsourced (3), november (3), potentially (3), long (3), extensible (3), academic (3), application (3), category (3), ruby (3), javascript (3), forth (3), comparison (3), calculus (3), logo (3), kent (3), robert (3), bobrow (3), edmund (3), california (3), apple (3), practical (3), requests (3), practice (3), manager (3), mlisp (3), mdl (3), knowledge (3), dylan (3), game (3), macintosh (3), cmu (3), allegro (3), commonloops (3), tree (3), hosting (3), typing (3), conditionals (3), automatic (3), modern (3), scripting (3), weekly (3), news (3), wiki (3), resources (3), sharing (3), logic (3), let (3), web (3), free (3), book (3), introductory (3), international (3), symposium (3), users (3), complete (3), publishing (3), september (3), introduction (3), press (3), operation (3), ideas (3), 2002 (3), 1996 (3), evolution (3), reading (3), june (3), january (3), world (3), extensions (3), edu (3), dotted (3), kind (3), cells (3), references (3), refer (3), sometimes (3), itself (3), boston (3), 978 (3), look (3), resurgence (3), turing (3), 1145 (3), doi (3), communications (3), 2003 (3), make (3), powerful (3), local (3), done (3), possibly (3), possible (3), kay (3), invented (3), connection (3), defining (3), through (3), 2009 (3), actively (3), 2018 (3), survey (3), running (3), compilation (3), eecs (3), course (3), undergraduate (3), lisp50 (3), did (3), 1975 (3), art (3), reference (3), 1985 (3), journal (3), 1960 (3), computation (3), pointers (3), single (3), 1984 (3), computing (3), top (3), longer (3), wolfram (3), 2016 (3), xerox (3), representation (3), descendant (3), following (3), fac (3), acc (3), applies (3), mapcar (3), wide (3), quite (3), differences (3), execution (3), handling (3), even (3), syntactic (3), write (3), seen (3), constructs (3), rather (3), specific (3), generally (3), termed (3), jump (3), else (3), applicative (3), input (3), piece (3), returning (3), whose (3), simplistic (3), quoting (3), command (3), entered (3), before (3), need (3), directly (3), develop (3), extension (3), add (3), efficient (3), preprocessor (3), power (3), simply (3), scope (3), others (3), considered (3), memory (3), should (3), constant (3), alter (3), almost (3), baz (3), snue (3), being (3), performance (3), shared (3), append (3), procedures (3), parenthesized (3), specified (3), class (3), rest (3), concept (3), fdefinition (3), passing (3), great (3), manipulate (3), metaobject (3), today (3), semantics (3), said (3), properly (3), existing (3), small (3), influences (3), strong (3), operations (3), virtual (3), series (3), revised (3), successor (3), significant (3), somewhat (3), 1990s (3), published (3), historically (3), became (3), developers (2), view (2), contact (2), privacy (2), policy (2), text (2), site (2), wikimedia (2), foundation (2), norsk (2), bahasa (2), wikiversity (2), wikiquote (2), wikibooks (2), upload (2), what (2), tools (2), events (2), search (2), talk (2), personal (2), hidden (2), categories (2), sudoc (2), curlie (2), mismatch (2), april (2), containing (2), dated (2), template (2), cs1 (2), typed (2), american (2), https (2), index (2), php (2), lisp_ (2), france (2), national (2), generational (2), swift (2), perl (2), lua (2), erlang (2), abelson (2), julie (2), matthias (2), felleisen (2), weinreb (2), pitman (2), 10th (2), stallman (2), park (2), luckham (2), hodes (2), fox (2), education (2), business (2), sicp (2), books (2), hyperspec (2), technical (2), hardware (2), skill (2), rpl (2), bbn (2), openlisp (2), tinyscheme (2), siod (2), larceny (2), ikarus (2), guile (2), gambit (2), chicken (2), chez (2), sbcl (2), steel (2), bank (2), cmucl (2), clozure (2), clisp (2), abcl (2), armed (2), bear (2), storage (2), management (2), planet (2), lisppaste (2), faq (2), via (2), directory (2), cliki (2), podcast (2), interview (2), role (2), tutorial (2), meeting (2), association (2), meetings (2), nasa (2), software (2), transcript (2), museum (2), herbert (2), stoyan (2), documents (2), media (2), external (2), largely (2), chapter (2), 1964 (2), computers (2), eds (2), 2004 (2), reilly (2), big (2), speech (2), 262 (2), veitch (2), 1993 (2), york (2), smith (2), micro (2), chris (2), chrysalisp (2), hartmann (2), lukas (2), 2015 (2), mezzano (2), medley (2), archive (2), good (2), constraints (2), quasiquote (2), metaprogramming (2), improper (2), typically (2), normally (2), printed (2), printing (2), clear (2), cannot (2), although (2), usa (2), concepts (2), award (2), lecture (2), edsger (2), dijkstra (2), 1972 (2), 1721 (2), hdl (2), real (2), understand (2), idea (2), finally (2), smaller (2), late (2), means (2), state (2), according (2), chess (2), routines (2), editor (2), prehistory (2), 1178 (2), sawfish (2), librep (2), script (2), gimp (2), backwards (2), llvm (2), native (2), just (2), electrical (2), mitx (2), why (2), now (2), instead (2), schemers (2), r5rs (2), oopsla (2), 1997 (2), mark (2), come (2), lewis (2), lab (2), extended (2), interfaces (2), abrahams (2), michael (2), group (2), word (2), size (2), started (2), tops (2), life (2), tim (2), memo (2), 2005 (2), 2014 (2), among (2), modifying (2), ran (2), integrated (2), inference (2), writing (2), library (2), loops (2), versions (2), descended (2), models (2), dolist (2), reverse (2), above (2), zerop (2), optional (2), alternative (2), underlying (2), naturally (2), mathematical (2), recursively (2), hello (2), corresponding (2), yielding (2), map (2), task (2), true (2), noted (2), favor (2), flow (2), preferred (2), familiar (2), closely (2), particular (2), place (2), entrant (2), case (2), once (2), led (2), students (2), moreover (2), issue (2), objective (2), matter (2), requirements (2), require (2), fact (2), traditional (2), increase (2), cond (2), undefined (2), leaving (2), error (2), necessary (2), job (2), trivial (2), out (2), describe (2), addition (2), twenty (2), textual (2), translates (2), valid (2), ide (2), needs (2), might (2), mechanism (2), interpreted (2), feature (2), easy (2), parser (2), manipulated (2), unlike (2), exploit (2), fundamental (2), distinction (2), exploitation (2), compilers (2), static (2), autocad (2), closure (2), quotation (2), bad (2), behavior (2), similar (2), bizarre (2), stuff (2), literals (2), subsequent (2), comma (2), backquote (2), marked (2), abbreviation (2), entering (2), avoid (2), point (2), bang (2), includes (2), bugs (2), improvement (2), say (2), sequence (2), constructed (2), fully (2), lisps (2), refers (2), pointer (2), empty (2), lost (2), styles (2), difference (2), unique (2), appeared (2), places (2), exactly (2), altered (2), distinguished (2), essentially (2), global (2), anonymous (2), treated (2), variables (2), james (2), never (2), useful (2), incf (2), derived (2), arithmetic (2), able (2), giving (2), below (2), prefix (2), gives (2), limited (2), protocol (2), discuss (2), though (2), interest (2), considerable (2), our (2), sophisticated (2), described (2), algorithms (2), turn (2), message (2), 1970s (2), reflective (2), dispatch (2), generic (2), specification (2), level (2), innovations (2), r7rs (2), r6rs (2), best (2), known (2), processor (2), visual (2), primitive (2), compatible (2), decade (2), earlier (2), certain (2), find (2), continues (2), report (2), algorithmic (2), large (2), borrowed (2), platforms (2), bsd (2), choices (2), inspired (2), accepted (2), declined (2), collects (2), irc (2), service (2), commercial (2), naughty (2), dog (2), acl2 (2), model (2), influence (2), attempt (2), cleaned (2), attempts (2), 226 (2), direct (2), especially (2), mac (2), distributed (2), core (2), year (2), spawned (2), genealogy (2), variants (2), abandoned (2), 1955 (2), church (2), paradigm (2), oct (2), sep (2), cookie, statement, statistics, mobile, disclaimers, additional, apply, agree, registered, trademark, profit, organization, creative, attribution, sharealike, license, edited, utc, žemaitėška, tiếng, việt, українська, türkçe, тоҷикӣ, ไทย, தமிழ், svenska, suomi, srpskohrvatski, српскохрватски, српски, srpski, کوردی, slovenščina, slovenčina, shqip, русский, română, português, polski, oʻzbekcha, ўзбекча, nynorsk, bokmål, 日本語, nederlands, монгол, melayu, मराठी, മലയാളം, malagasy, magyar, lietuvių, latviešu, latina, кыргызча, עברית, italiano, íslenska, indonesia, hrvatski, հայերեն, 한국어, galego, gaeilge, français, فارسی, euskara, esperanto, español, ελληνικά, eesti, deutsch, dansk, cymraeg, čeština, català, bosanski, български, беларуская, বাংলা, azərbaycanca, asturianu, aragonés, العربية, printable, download, export, permanent, link, portal, learn, contribute, donate, random, current, views, namespaces, log, account, contributions, logged, menu, nkc, lccn, j9u, gnd, bnf, bne, namespace, disputed, accuracy, disputes, webarchive, volume, errors, missing, periodical, dynamically, inventions, title, programming_language, oldid, 1114251685, faceted, subject, terminology, czech, republic, united, states, israel, germany, spain, authority, categorical, alphabetical, simula, shell, sql, rust, prolog, pascal, kotlin, cobol, apl, ada, fountain, situation, formalism, frame, problem, dartmouth, workshop, circumscription, cynthia, solomon, mitchel, resnick, seymour, papert, brian, harvey, wally, feurzeig, denison, bollay, hal, shriram, krishnamurthi, moon, rule, philip, greenspun, scott, fahlman, joel, moses, tappan, morris, louis, greenblatt, phyllis, matthew, flatt, bruce, findler, dybvig, william, clinger, people, csail, xanalys, lucid, harlequin, bolt, beranek, newman, organizations, programbydesign, curriculum, htdp, cadet, keyboard, explorer, scsh, mcclim, ucblogo, starlogo, netlogo, mswlogo, unstandardized, scm, rscheme, pocket, multilisp, kawa, jscheme, bigloo, poplog, movitz, mocl, lispworks, gcl, ecl, embeddable, corman, deprecated, minnesota, minneapolis, discusses, describes, funded, advanced, agency, robotics, charles, babbage, oral, interviews, land, freeware, edition, seibel, comic, casting, spels, tutorials, associations, cassel, remembers, debugging, deep, robots, bell, adam, gordon, photos, corecursive, ron, garret, acknowledged, own, textbooks, wikisource, texts, quotations, wiktionary, definitions, weissman, clark, 1967, belmont, dickenson, company, primer, automation, appraisal, cambridge, 596, 00662, hackers, painters, age, experiences, 01153, harold, jim, 1998, salus, vol, indianapolis, macmillan, 57870, 011, 107, 158, handbook, sigplan, 231, 270, 89791, 570, tony, pioneer, shelton, mind, behind, nascom, hinsley, froggey, internet, proven, liam, wild, 108, 1988, 1986, abstraction, norvig, semantic, bawden, quasiquotation, washington, 1999, cse, 341, target, enabled, reuse, displayed, sebesta, addison, wesley, 281, 284, 677, 680, 139531, jargon, humble, ewd, 340, lieberman, henry, hewitt, carl, 1983, 419, 429, 14161480, s2cid, 6335, 358141, 358147, 8633, citeseerx, collector, lifetimes, objects, didn, monster, tangible, metalanguage, got, close, phase, understanding, nicer, bound, understructures, oop, messaging, retention, protection, hiding, extreme, binding, things, aware, meaning, legal, move, wrote, 1957, proposing, sent, arbitrarily, demoted, letter, wikia, constrained, rational, depth, collections, featuring, jvm, clasp, interoperates, jit, hits, million, enrollments, www, broder, evan, mitadmissions, end, era, cemerick, com, faqs, trends, future, road, charter, kantrowitz, margolin, barry, frequently, asked, questions, 152414, aim, 349, memos, outils, generation, etat, classification, mrabet, teitelman, warren, 1974, quam, lynn, diffle, whitfield, 13011, accessed, requires, center, maling, brayton, bergin, thomas, gibson, 233, 330, 201, 89502, 234286, 1057818, usefulness, hurley, 1963, grew, bits, 84950, tut, cis, ohio, usenet, alt, folklore, newsgroup, acs, 15th, preface, lfp, proceedings, 307, 800055, 802047, machinery, 1959, canfield, jones, robin, maynard, clive, stewart, ian, springer, 9781447117193, chisnall, 2011, influential, revenge, nerds, apro, 1978, 6094, modularity, parts, conclusions, 2001, survivor, quarter, century, active, foreword, edwin, greenwood, 156, 157, 57356, 521, milestones, docs, renamed, graphical, tao, taos, workstations, star, conventions, methods, kee, units, atms, truth, maintenance, engine, aid, garnet, gui, objectlisp, incorporated, integral, alongside, push, reverses, thing, iterative, less, previous, optimizes, lends, problems, enumeration, sets, successively, collecting, results, heritage, array, relating, sequences, cases, explicit, accomplished, algorithm, expressed, tends, seem, structured, resembles, pure, deepest, supports, save, restore, escape, implementing, expanded, who, wants, know, keywords, surface, appearance, differ, necessarily, commonality, believe, iterations, incorrect, oft, key, subjective, encouraged, expressly, supported, commonly, elimination, casual, replacement, discouraged, stylistic, preference, efficiency, apparent, correctness, risking, overflow, added, precursor, leftmost, innermost, room, eagerly, editing, debugger, infinite, must, traverse, mean, every, applying, yields, answer, hundred, accepts, parses, prompt, happens, follows, omits, interactive, combined, directs, transmit, prints, reads, expand, step, offer, interesting, options, precomputed, emitted, module, literally, traversed, executing, substantial, conventional, bytecode, cleanly, stark, reasonable, anything, purely, human, readable, characters, splits, default, formalization, philosophical, gödel, escher, bach, douglas, hofstadter, erroneous, resulting, files, coalesce, constants, put, protected, modify, mutable, modifies, invocations, character, plain, except, interpolated, expansions, splice, unquote, grave, accent, prevent, literal, enter, simpler, themselves, aficionados, favors, cautionary, exclamation, replaces, commonplace, replace, rarely, facility, easier, frequent, functionally, prototyping, safe, rplaca, thereby, unexpected, documented, copying, give, dramatic, technique, interact, undesired, passed, altering, replacing, affect, copy, pointing, locations, share, final, appends, appending, displaystyle, asymptotic, complexity, front, asymmetric, handles, pairs, accessing, controlling, conventionally, abbreviated, combination, universal, misconception, vectors, hash, tables, arrays, atomic, container, nothing, aggregate, traversal, taking, successive, cdrs, visit, cdring, down, taken, head, referring, datum, composed, fields, discussed, next, singly, box, diagram, 613, evolved, importance, retained, predicate, legacy, essential, immutable, whereas, separate, independently, finite, ordered, contains, alphanumeric, block, defines, conceptually, storing, doing, execute, applied, binds, greater, differently, invoked, therefore, bind, returned, logical, circuit, substituted, provide, otherwise, setq, notion, take, increment, ary, variadic, infix, similarly, nested, preceding, unquoted, enclosing, remainder, entity, separated, surrounded, implicitly, integers, declared, whitespace, reliance, flexibility, processed, enables, limit, immediately, obvious, families, nicknames, responsible, consistent, facilitates, manipulation, notations, xmlisp, employs, integrate, markup, xml, lots, irritating, superfluous, stupid, sexps, mirror, found, produces, dubious, resource, respect, microprocessors, become, outside, suitability, enjoyed, 2010s, principles, shown, remarkable, stability, besides, carrier, sense, jokingly, intelligent, misuse, think, compliment, transmits, flavour, liberation, assisted, gifted, fellow, humans, thinking, previously, impossible, thoughts, walks, looking, unused, progress, stimulated, heap, deeply, leader, team, adopting, classes, encapsulating, instances, multimethods, flexible, served, possess, suggested, confluence, regarded, conceived, mixin, parc, proposed, inclusion, took, popularized, faithfully, quality, dubbed, lower, manipulations, advantages, regard, expressive, suitable, homoiconicity, load, trees, distinct, entirely, treating, uniformly, goto, identifies, nine, important, aspects, officially, nyquist, potential, particularly, successfully, image, harper, window, lilypond, audacity, targets, mainly, clr, compiling, pragmatic
Text of the page (random words):
ist so the expression list 1 2 quote foo evaluates to the list 1 2 foo the quote before the foo in the preceding example is a special operator which returns its argument without evaluating it any unquoted expressions are recursively evaluated before the enclosing expression is evaluated for example list 1 2 list 3 4 evaluates to the list 1 2 3 4 note that the third argument is a list lists can be nested operators edit arithmetic operators are treated similarly the expression 1 2 3 4 evaluates to 10 the equivalent under infix notation would be 1 2 3 4 lisp has no notion of operators as implemented in algol derived languages arithmetic operators in lisp are variadic functions or n ary able to take any number of arguments a c style increment operator is sometimes implemented under the name incf giving syntax incf x equivalent to setq x x 1 returning the new value of x special operators sometimes called special forms provide lisp s control structure for example the special operator if takes three arguments if the first argument is non nil it evaluates to the second argument otherwise it evaluates to the third argument thus the expression if nil list 1 2 foo list 3 4 bar evaluates to 3 4 bar of course this would be more useful if a non trivial expression had been substituted in place of nil lisp also provides logical operators and or and not the and and or operators do short circuit evaluation and will return their first nil and non nil argument respectively or and zero nil never james task time will evaluate to james lambda expressions and function definition edit another special operator lambda is used to bind variables to values which are then evaluated within an expression this operator is also used to create functions the arguments to lambda are a list of arguments and the expression or expressions to which the function evaluates the returned value is the value of the last expression that is evaluated the expression lambda arg arg 1 evaluates to a function that when applied takes one argument binds it to arg and returns the number one greater than that argument lambda expressions are treated no differently from named functions they are invoked the same way therefore the expression lambda arg arg 1 5 evaluates to 6 here we re doing a function application we execute the anonymous function by passing to it the value 5 named functions are created by storing a lambda expression in a symbol using the defun macro defun foo a b c d a b c d defun f a b defines a new function named f in the global environment it is conceptually similar to the expression setf fdefinition f lambda a block f b where setf is a macro used to set the value of the first argument fdefinition f to a new function object fdefinition is a global function definition for the function named f is an abbreviation for function special operator returning a function object atoms edit in the original lisp there were two fundamental data types atoms and lists a list was a finite ordered sequence of elements where each element is either an atom or a list and an atom was a number or a symbol a symbol was essentially a unique named item written as an alphanumeric string in source code and used either as a variable name or as a data item in symbolic processing for example the list foo bar 1 2 contains three elements the symbol foo the list bar 1 and the number 2 the essential difference between atoms and lists was that atoms were immutable and unique two atoms that appeared in different places in source code but were written in exactly the same way represented the same object citation needed whereas each list was a separate object that could be altered independently of other lists and could be distinguished from other lists by comparison operators as more data types were introduced in later lisp dialects and programming styles evolved the concept of an atom lost importance citation needed many dialects still retained the predicate atom for legacy compatibility citation needed defining it true for any object which is not a cons conses and lists edit main article cons box and pointer diagram for the list 42 69 613 a lisp list is implemented as a singly linked list 59 each cell of this list is called a cons in scheme a pair and is composed of two pointers called the car and cdr these are respectively equivalent to the data and next fields discussed in the article linked list of the many data structures that can be built out of cons cells one of the most basic is called a proper list a proper list is either the special nil empty list symbol or a cons in which the car points to a datum which may be another cons structure such as a list and the cdr points to another proper list if a given cons is taken to be the head of a linked list then its car points to the first element of the list and its cdr points to the rest of the list for this reason the car and cdr functions are also called first and rest when referring to conses which are part of a linked list rather than say a tree thus a lisp list is not an atomic object as an instance of a container class in c or java would be a list is nothing more than an aggregate of linked conses a variable that refers to a given list is simply a pointer to the first cons in the list traversal of a list can be done by cdring down the list that is taking successive cdrs to visit each cons of the list or by using any of several higher order functions to map a function over a list because conses and lists are so universal in lisp systems it is a common misconception that they are lisp s only data structures in fact all but the most simplistic lisps have other data structures such as vectors arrays hash tables structures and so forth s expressions represent lists edit parenthesized s expressions represent linked list structures there are several ways to represent the same list as an s expression a cons can be written in dotted pair notation as a b where a is the car and b the cdr a longer proper list might be written a b c d nil in dotted pair notation this is conventionally abbreviated as a b c d in list notation an improper list 60 may be written in a combination of the two as a b c d for the list of three conses whose last cdr is d i e the list a b c d in fully specified form list processing procedures edit lisp provides many built in procedures for accessing and controlling lists lists can be created directly with the list procedure which takes any number of arguments and returns the list of these arguments list 1 2 a 3 output 1 2 a 3 list 1 2 3 4 output 1 2 3 4 because of the way that lists are constructed from cons pairs the cons procedure can be used to add an element to the front of a list note that the cons procedure is asymmetric in how it handles list arguments because of how lists are constructed cons 1 2 3 output 1 2 3 cons 1 2 3 4 output 1 2 3 4 the append procedure appends two or more lists to one another because lisp lists are linked lists appending two lists has asymptotic time complexity o n displaystyle o n append 1 2 3 4 output 1 2 3 4 append 1 2 3 a 5 6 output 1 2 3 a 5 6 shared structure edit lisp lists being simple linked lists can share structure with one another that is to say two lists can have the same tail or final sequence of conses for instance after the execution of the following common lisp code setf foo list a b c setf bar cons x cdr foo the lists foo and bar are a b c and x b c respectively however the tail b c is the same structure in both lists it is not a copy the cons cells pointing to b and c are in the same memory locations for both lists sharing structure rather than copying can give a dramatic performance improvement however this technique can interact in undesired ways with functions that alter lists passed to them as arguments altering one list such as by replacing the c with a goose will affect the other setf third foo goose this changes foo to a b goose but thereby also changes bar to x b goose a possibly unexpected result this can be a source of bugs and functions which alter their arguments are documented as destructive for this very reason aficionados of functional programming avoid destructive functions in the scheme dialect which favors the functional style the names of destructive functions are marked with a cautionary exclamation point or bang such as set car read set car bang which replaces the car of a cons in the common lisp dialect destructive functions are commonplace the equivalent of set car is named rplaca for replace car this function is rarely seen however as common lisp includes a special facility setf to make it easier to define and use destructive functions a frequent style in common lisp is to write code functionally without destructive calls when prototyping then to add destructive calls as an optimization where it is safe to do so self evaluating forms and quoting edit lisp evaluates expressions which are entered by the user symbols and lists evaluate to some other usually simpler expression for instance a symbol evaluates to the value of the variable it names 2 3 evaluates to 5 however most other forms evaluate to themselves if entering 5 into lisp it returns 5 any expression can also be marked to prevent it from being evaluated as is necessary for symbols and lists this is the role of the quote special operator or its abbreviation one quotation mark for instance usually if entering the symbol foo it returns the value of the corresponding variable or an error if there is no such variable to refer to the literal symbol enter quote foo or usually foo both common lisp and scheme also support the backquote operator termed quasiquote in scheme entered with the character grave accent this is almost the same as the plain quote except it allows expressions to be evaluated and their values interpolated into a quoted list with the comma unquote and comma at splice operators if the variable snue has the value bar baz then foo snue evaluates to foo bar baz while foo snue evaluates to foo bar baz the backquote is most often used in defining macro expansions 61 62 self evaluating forms and quoted forms are lisp s equivalent of literals it may be possible to modify the values of mutable literals in program code for instance if a function returns a quoted form and the code that calls the function modifies the form this may alter the behavior of the function on subsequent invocations defun should be constant one two three let stuff should be constant setf third stuff bizarre bad should be constant returns one two bizarre modifying a quoted form like this is generally considered bad style and is defined by ansi common lisp as erroneous resulting in undefined behavior in compiled files because the file compiler can coalesce similar constants put them in write protected memory etc lisp s formalization of quotation has been noted by douglas hofstadter in gödel escher bach and others as an example of the philosophical idea of self reference scope and closure edit the lisp family splits over the use of dynamic or static a k a lexical scope clojure common lisp and scheme make use of static scoping by default while newlisp picolisp and the embedded languages in emacs and autocad use dynamic scoping since version 24 1 emacs uses both dynamic and lexical scoping list structure of program code exploitation by macros and compilers edit a fundamental distinction between lisp and other languages is that in lisp the textual representation of a program is simply a human readable description of the same internal data structures linked lists symbols number characters etc as would be used by the underlying lisp system lisp uses this to implement a very powerful macro system like other macro languages such as the one defined by the c preprocessor the macro preprocessor for the c objective c and c programming languages a macro returns code that can then be compiled however unlike c preprocessor macros the macros are lisp functions and so can exploit the full power of lisp further because lisp code has the same structure as lists macros can be built with any of the list processing functions in the language in short anything that lisp can do to a data structure lisp macros can do to code in contrast in most other languages the parser s output is purely internal to the language implementation and cannot be manipulated by the programmer this feature makes it easy to develop efficient languages within languages for example the common lisp object system can be implemented cleanly as a language extension using macros this means that if an application needs a different inheritance mechanism it can use a different object system this is in stark contrast to most other languages for example java does not support multiple inheritance and there is no reasonable way to add it in simplistic lisp implementations this list structure is directly interpreted to run the program a function is literally a piece of list structure which is traversed by the interpreter in executing it however most substantial lisp systems also include a compiler the compiler translates list structure into machine code or bytecode for execution this code can run as fast as code compiled in conventional languages such as c macros expand before the compilation step and thus offer some interesting options if a program needs a precomputed table then a macro might create the table at compile time so the compiler need only output the table and need not call code to create the table at run time some lisp implementations even have a mechanism eval when that allows code to be present during compile time when a macro would need it but not present in the emitted module 63 evaluation and the read eval print loop edit lisp languages are often used with an interactive command line which may be combined with an integrated development environment ide the user types in expressions at the command line or directs the ide to transmit them to the lisp system lisp reads the entered expressions evaluates them and prints the result for this reason the lisp command line is called a read eval print loop repl the basic operation of the repl is as follows this is a simplistic description which omits many elements of a real lisp such as quoting and macros the read function accepts textual s expressions as input and parses them into an internal data structure for instance if you type the text 1 2 at the prompt read translates this into a linked list with three elements the symbol the number 1 and the number 2 it so happens that this list is also a valid piece of lisp code that is it can be evaluated this is because the car of the list names a function the addition operation note that a foo will be read as a single symbol 123 will be read as the number one hundred and twenty three 123 will be read as the string 123 the eval function evaluates the data returning zero or more other lisp data as a result evaluation does not have to mean interpretation some lisp systems compile ever...
|