• Complain

R. Kent Dybvig - The Scheme Programming Language

Here you can read online R. Kent Dybvig - The Scheme Programming Language full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2009, publisher: The MIT Press, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

R. Kent Dybvig The Scheme Programming Language
  • Book:
    The Scheme Programming Language
  • Author:
  • Publisher:
    The MIT Press
  • Genre:
  • Year:
    2009
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

The Scheme Programming Language: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "The Scheme Programming Language" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Scheme is a general-purpose programming language, descended from Algol and Lisp, widely used in computing education and research and a broad range of industrial applications. This thoroughly updated edition of The Scheme Programming Language provides an introduction to Scheme and a definitive reference for standard Scheme, presented in a clear and concise manner. Written for professionals and students with some prior programming experience, it begins by leading the programmer gently through the basics of Scheme and continues with an introduction to some of the more advanced features of the language. The fourth edition has been substantially revised and expanded to bring the content up to date with the current Scheme standard, the Revised6 Report on Scheme. All parts of the book were updated and three new chapters were added, covering the languages new library, exception handling, and record-definition features. The book offers three chapters of introductory material with numerous examples, eight chapters of reference material, and one chapter of extended examples and additional exercises. All of the examples can be entered directly from the keyboard into an interactive Scheme session. Answers to many of the exercises, a complete formal syntax of Scheme, and a summary of forms and procedures are provided in appendixes. The Scheme Programming Language is the only book available that serves both as an introductory text in a variety of courses and as an essential reference for Scheme programmers.

R. Kent Dybvig: author's other books


Who wrote The Scheme Programming Language? Find out the surname, the name of the author of the book and a list of all author's works by series.

The Scheme Programming Language — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "The Scheme Programming Language" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Answers to Selected Exercises

Exercise )

a.(+ (* 1.2 (- 2 1/3)) -8.7)
b.(/ (+ 2/3 4/9) (- 5/11 4/3))
c.(+ 1 (/ 1 (+ 2 (/ 1 (+ 1 1/2)))))
d.(* (* (* (* (* (* 1 -2) 3) -4) 5) -6) 7) or (* 1 -2 3 -4 5 -6 7)

Exercise )
See Section .

Exercise )

a.(car . cdr)
b.(this (is silly))
c.(is this silly?)
d.(+ 2 3)
e.(+ 2 3)
f.+
g.(2 3)
h.#
i.cons
j.'cons
k.quote
l.5
m.5
n.5
o.5

Exercise )

(car (cdr (car '((a b) (c d))))) Picture 1 b
(car (car (cdr '((a b) (c d))))) c car cdr car cdr a b c d d Exercise a b c d - photo 2 c
(car (cdr (car (cdr '((a b) (c d)))))) d Exercise a b c d Exercise Exercise car a - photo 3 d

Exercise )

'((a . b) ((c) d) ())

Exercise )
Exercise car a b c d a b car car a b c d a cdr - photo 4

Exercise )

(car '((a b) (c d))) Picture 5 (a b)
(car (car '((a b) (c d)))) Picture 6 a
(cdr (car '((a b) (c d)))) Picture 7 (b)
(car (cdr (car '((a b) (c d))))) Picture 8 b
(cdr (cdr (car '((a b) (c d))))) Picture 9 ()
(cdr '((a b) (c d))) Picture 10 ((c d))
(car (cdr '((a b) (c d)))) Picture 11 (c d)
(car (car (cdr '((a b) (c d))))) Picture 12 c
(cdr (car (cdr '((a b) (c d))))) Picture 13 (d)
(car (cdr (car (cdr '((a b) (c d)))))) Picture 14 d
(cdr (cdr (car (cdr '((a b) (c d)))))) Picture 15 ()
(cdr (cdr '((a b) (c d)))) Picture 16 ()

Exercise )
See Section .

Exercise )

  1. Evaluate the variables list, +, -, *, and /, yielding the list, addition, subtraction, multiplication, and division procedures.
  2. Apply the list procedure to the addition, subtraction, multiplication, and division procedures, yielding a list containing these procedures in order.
  3. Evaluate the variable cdr, yielding the cdr procedure.
  4. Evaluate the variable car, yielding the car procedure.
  5. Apply the car procedure to the list produced in step
  6. Evaluate the constants 17 and 5, yielding 17 and 5.
  7. Apply the subtraction procedure to 17 and 5, yielding 12.

Other orders are possible. For example, the variable car could have been evaluated before its argument.

Exercise )

a.(let ([x (* 3 a)]) (+ (- x b) (+ x b)))
b.(let ([x (list a b c)]) (cons (car x) (cdr x)))

Exercise )
The value is 54. The outer let binds x to 9, while the inner let binds x to 3 (9/3). The inner let evaluates to 6 (3 + 3), and the outer let evaluates to 54 (9 6).

Exercise )

a.

(let ([x0 'a] [y0 'b])
(list (let ([x1 'c]) (cons x1 y0))
(let ([y1 'd]) (cons x0 y1))))

b.

(let ([x0 '((a b) c)])
(cons (let ([x1 (cdr x0)])
(car x1))
(let ([x2 (car x0)])
(cons (let ([x3 (cdr x2)])
(car x3))
(cons (let ([x4 (car x2)])
x4)
(cdr x2))))))

Exercise )

a.a
b.(a)
c.a
d.()

Exercise )
See page .

Exercise )

a.no free variables
b.+
c.f
d.cons, f, and y
e.cons and y
f.cons, y, and z (y also appears as a bound variable)

Exercise )
The program would loop indefinitely.

Exercise )

(define compose
(lambda (p1 p2)
(lambda (x)
(p1 (p2 x)))))
(define cadr (compose car cdr))
(define cddr (compose cdr cdr))

Exercise )

(define caar (compose car car))
(define cadr (compose car cdr))
(define cdar (compose cdr car))
(define cddr (compose cdr cdr))
(define caaar (compose car caar))
(define caadr (compose car cadr))
(define cadar (compose car cdar))
(define caddr (compose car cddr))
(define cdaar (compose cdr caar))
(define cdadr (compose cdr cadr))
(define cddar (compose cdr cdar))
(define cdddr (compose cdr cddr))
(define caaaar (compose caar caar))
(define caaadr (compose caar cadr))
(define caadar (compose caar cdar))
(define caaddr (compose caar cddr))
(define cadaar (compose cadr caar))
(define cadadr (compose cadr cadr))
(define caddar (compose cadr cdar))
(define cadddr (compose cadr cddr))
(define cdaaar (compose cdar caar))
(define cdaadr (compose cdar cadr))
(define cdadar (compose cdar cdar))
(define cdaddr (compose cdar cddr))
(define cddaar (compose cddr caar))
(define cddadr (compose cddr cadr))
(define cdddar (compose cddr cdar))
(define cddddr (compose cddr cddr))

Exercise )

(define atom?
(lambda (x)
(not (pair? x))))

Exercise )

(define shorter
(lambda (ls1 ls2)
(if (< (length ls2) (length ls1))
ls2
ls1)))

Exercise )
The structure of the output would be the mirror image of the structure of the input. For example, (a . b) would become (b . a) and ((a . b) . (c . d)) would become ((d . c) . (b . a)).

Exercise )

(define append
(lambda (ls1 ls2)
(if (null? ls1)
ls2
(cons (car ls1) (append (cdr ls1) ls2)))))

Exercise )

(define make-list
(lambda (n x)
(if (= n 0)
'()
(cons x (make-list (- n 1) x)))))

Exercise )
See the description of list-ref on page .

Exercise )

(define shorter?
(lambda (ls1 ls2)
(and (not (null? ls2))
(or (null? ls1)
(shorter? (cdr ls1) (cdr ls2))))))
(define shorter
(lambda (ls1 ls2)
(if (shorter? ls2 ls1)
ls2
ls1)))

Exercise )

(define even?
(lambda (x)
(or (= x 0)
(odd? (- x 1)))))
(define odd?
(lambda (x)
(and (not (= x 0))
(even? (- x 1)))))

Exercise )

(define transpose
(lambda (ls)
(cons (map car ls) (map cdr ls))))

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «The Scheme Programming Language»

Look at similar books to The Scheme Programming Language. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «The Scheme Programming Language»

Discussion, reviews of the book The Scheme Programming Language and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.