jagomart
digital resources
picture1_Lisp Pdf 192125 | Lec2 Item Download 2023-02-05 17-52-02


 192x       Filetype PDF       File size 0.03 MB       Source: cseweb.ucsd.edu


File: Lisp Pdf 192125 | Lec2 Item Download 2023-02-05 17-52-02
an introduction to lisp how to interact with lisp sdcc5 ucsd edu cl allegro cl 4 1 4 9 93 17 00 copyright c 1985 1992 franz inc berkeley ca ...

icon picture PDF Filetype PDF | Posted on 05 Feb 2023 | 2 years ago
Partial capture of text on file.
           An Introduction to LISP
           ✔ How to interact with LISP:
           sdcc5.ucsd.edu% cl
           Allegro CL 4.1 [SPARC; R1] (4/9/93 17:00)
           Copyright (C) 1985-1992 Franz Inc., Berkeley CA, USA.
           ;; Optimization settings; safety 1, space 1, speed 1, debug 2
           ;; For a complete description of all compiler switches
           ;; evaluate (EXPLAIN-COMPILER-SETTINGS).
           USER(1):
           ✔ cl stands for Common LISP, now the standard dialect of LISP
           ✔ (Note the semicolons ; In LISP programs, comments start with a
              semicolon and go to the end of the line)
        LANGUAGES FOR AI                                                    Page 1 of 27
        LEC 2
           Interacting with LISP
           ✔ LISP is an interactive language
              ✗  (Common LISP also has a good compiler, and can do offline
                 computations)
           ✔ When you invoke LISP, the lisp interpreter enters a
              read - eval - print loop
           ✔ You type an expression in response to the prompt, and ...
              ✗  LISP reads in the expression you typed
              ✗  LISP evaluates it
              ✗  LISP prints the result of the evaluation, and prompts for the
                 next input
           ✔ (Note: in fact, read, eval, print are names of builtin LISP
              functions...)
        LANGUAGES FOR AI                                                    Page 2 of 27
        LEC 2
           Interacting with LISP
           ✔ What is the result of LISP’s evaluation process?
           ✔ It depends on the expression that is being evaluated
           ✔ Expressions are of two types:
              ✗   atoms
              ✗   lists
           ✔ Atoms are of two types:
              ✗   constants:
                   • numbers: 27, 3.14, 5/8, 1.0e26, etc.
                   • strings: “A string”, “another one”, etc.
                   • characters: #\a, #\A, #\b, etc.
              ✗   symbols: foobar, FooBaR, hyphenated-symbol, +, etc.
           ✔ A list is represented as
               (
                 < zero or more atoms or lists >
               )
              ✗   examples of lists:
               ()
               (item1 item2 item3)
               (foo (bar baz))
               (+ 3 4)
               (() (()()))
         LANGUAGES FOR AI                                                    Page 3 of 27
         LEC 2
          Expression types in LISP
                                        symbol
                              atom                    number
                                         constant     string
                                                      character
             s-expressions
                                       the empty list
                              list
                                       cons
        LANGUAGES FOR AI                                               Page 4 of 27
        LEC 2
The words contained in this file might help you see if this file matches what you are looking for:

...An introduction to lisp how interact with sdcc ucsd edu cl allegro copyright c franz inc berkeley ca usa optimization settings safety space speed debug for a complete description of all compiler switches evaluate explain user stands common now the standard dialect note semicolons in programs comments start semicolon and go end line languages ai page lec interacting is interactive language also has good can do ofine computations when you invoke interpreter enters read eval print loop type expression response prompt reads typed evaluates it prints result evaluation prompts next input fact are names builtin functions what s process depends on that being evaluated expressions two types atoms lists constants numbers e etc strings string another one characters b symbols foobar hyphenated symbol list represented as zero or more examples item foo bar baz atom number constant character empty cons...

no reviews yet
Please Login to review.