LISP Machine
which beated by UNIX on market.Algorithm
, you can ignore the low level details and focus on design, implement, and modify your Algorithm
.Ctrl
+ c
The quit character is ^C
(control-C). When typed, various interrupt options are offered. Type ^C
followed by ?
for a list of options.
The interrupt character is ^G
(control-G). When typed, scheme will get the ^G character interrupt. The default action is to abort the running program, and to resume the top level read-eval-print loop.
The terminal stop character is ^Z
(control-Z). When typed, scheme will suspend execution.
Interrupt option (? for help):
^B
: Enter a breakpoint loop.^C
: Goto to top level read-eval-print (REP) loop.^L
: Clear the screen.^U
: Up to previous (lower numbered) REP loop.^X
: Abort to current REP loop.D
: Debugging: change interpreter flags.E
: Examine memory location.H
: Print simple information on interrupts.I
: Ignore interrupt request.Q
: Quit instantly, killing Scheme.R
: Hard reset, possibly killing Scheme in the process.T
: Stack trace.Z
: Quit instantly, suspending Scheme.cond
cond
is short of condition, mean case.s-expression
(if <predicate> <consequent> <alternative>)
(and <e1> ... <en>)
(or <e1> ... <en>)
(not <e>)
Scheme
way 1
(define (abs x)
(cond ((< x 0) (- x))
((= x 0) 0)
((> x 0) x)))
Scheme
way 2
(define (abs x) C
if (x < 0) x=-x; Expression - Smallest unit of combination of characters, executed/evaluated by x
Primitive expressions, which represent the simplest entities of the language is concerned with
Means of combination, by which compound elements are built from simpler ones, and
Means of abstraction, by which compound elements can be named and manipulated as units
Procedure definition, a much more powerful abstraction technique by which a compound operation can be given a name and then referred to as a unit.