Lecture overview -- Keyboard shortcut: 'u'  Previous page: Equality in Scheme -- Keyboard shortcut: 'p'  Next page: Types [Section] -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home    Lecture 2 - Page 10 : 46
Functional Programming in Scheme
Expressions, Types, and Functions
The read-eval-print loop

On this page we will explain the idea and virtues of the so-called read-eval-print loop of Lisp and Scheme systems.

The 'read-eval-print loop' allows you to interact with a Scheme system in terms of evaluation of individual expressions
Some authors talk about a REPL - Read Eval Print Loop.

1> (+ 4 (* 5 6))
34

2> (define x 6)

3> (+ (* 5 x x) (* 4 x) 3)
207

4> (/ 21 5)
21/5

5> (/ 21.0 5)
4.2

6> (define (fak n) (if (= n 0) 1 (* n (fak (- n 1)))))

7> (fak 50)
30414093201713378043612608166064768844377641568960512000000000000

A sample session with Scheme using a read eval print loop.