SchemeTutorial.pdf
(
854 KB
)
Pobierz
Scheme Tutorial (for Artificial Intelligence)
for
B551 (and B351)
Please download
Petite Chez Scheme
(Scheme.com)
If you haven’t already
Todd Holloway
Indiana University
08-31-2007
Lots of parenthesis (((((((((())))))))))
When debugging, check for mismatched parenthesis
Lots of lists
Schemers love list processing
Lots of recursion
Loops are often recursively defined
And lots of lambdas
Pass variables, functions in many (often imaginative)
ways
Petite Chez Scheme Version 7.3
;; semi-colons are used for comments
(+ 3 5) ; form is function followed by args
8
(+ (* 2 2) (* 5 5)) ; composition of functions
29
(length '(1 3 5 9 11)) ; first look at lists
5
(eqv? 42 42) ; take a look at eq?, =, and equal? as well
#t
(min 1 3 4 2 3) ; no limit on number of arguments
1
(display 8)
8
(let ((x 3) (y 4) (z 5)) (display (+ x 1))) ; local vars
4
Note: This can be implemented using lambdas instead
Plik z chomika:
zuchel
Inne pliki z tego folderu:
r6rs.pdf
(838 KB)
SICP.zip
(1168 KB)
An operational semantics for R5RS Scheme.pdf
(169 KB)
r5rs-scheme-standard.pdf
(559 KB)
SchemeTutorial.pdf
(854 KB)
Inne foldery tego chomika:
(lisp)
CEO
CLIPS
DSL
elixir
Zgłoś jeśli
naruszono regulamin