Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Teach Yourself Scheme in Fixnum Days



This is an introduction to the Scheme programming language. It is intended as a
quick-start guide, something a novice can use to get a non-trivial working knowledge
of the language, before moving on to more comprehensive and in-depth texts.





Contents
Preface, 3
1 Enter Scheme, 4
2 Data types, 6
2.1 Simple data types, 7
2.1.1 Booleans, 7
2.1.2 Numbers, 7
2.1.3 Characters, 8
2.1.4 Symbols, 9
2.2 Compound data types, 10
2.2.1 Strings, 10
2.2.2 Vectors, 11
2.2.3 Dotted pairs and lists, 11
2.2.4 Conversions between data types, 13
2.3 Other data types, 14
2.4 S-expressions, 14
3 Forms, 14
3.1 Procedures, 15
3.1.1 Procedure parameters, 16
3.1.2 Variable number of arguments, 16
3.2 apply, 16
3.3 Sequencing, 16
4 Conditionals, 17
4.1 when and unless, 18
4.2 cond, 19
4.3 case, 19
4.4 and and or, 19
5 Lexical variables, 20
5.1 let and let*, 22
5.2 fluid-let, 23
6 Recursion, 24
6.1 letrec, 25
6.2 Named let, 26
6.3 Iteration, 26
6.4 Mapping a procedure across a list, 27
7 I/O, 27
7.1 Reading, 28
7.2 Writing, 28
7.3 File ports, 28
7.3.1 Automatic opening and closing of file ports, 29
7.4 String ports, 29
7.5 Loading files, 30
8 Macros, 30
8.1 Specifying the expansion as a template, 32
8.2 Avoiding variable capture inside macros, 33
8.3 fluid-let, 34
9 Structures, 35
9.1 Default initializations, 36
9.2 defstruct defined, 37
10 Alists and tables, 38
11 System interface, 40
11.1 Checking for and deleting files, 41
11.2 Calling operating-system commands, 41
11.3 Environment variables, 41
12 Objects and classes, 42
12.1 A simple object system, 43
12.2 Classes are instances too, 47
12.3 Multiple inheritance, 48
13 Jumps, 49
13.1 call-with-current-continuation, 50
13.2 Escaping continuations, 51
13.3 Tree matching, 52
13.4 Coroutines, 53
13.4.1 Tree-matching with coroutines, 54
14 Nondeterminism, 55
14.1 Description of amb, 56
14.2 Implementing amb in Scheme, 57
14.3 Using amb in Scheme, 58
14.4 Logic puzzles, 59
14.4.1 The Kalotan puzzle, 60
14.4.2 Map coloring, 61
15 Engines, 63
15.1 The clock, 64
15.2 Flat engines, 65
15.3 Nestable engines, 66
16 Shell scripts, 68
16.1 Hello, World!, again, 69
16.2 Scripts with arguments, 70
16.3 Example, 71
17 CGI scripts, 72
17.1 Example: Displaying environment variables, 73
17.2 Example: Displaying selected environment variable, 75
17.3 CGI script utilities, 77
17.4 A calculator via CGI, 80
A Scheme dialects, 82
A.1 Invocation and init files, 83
A.2 Shell scripts, 84
A.3 define-macro, 84
A.4 load-relative, 85
B DOS batch files in Scheme, 86
C Numerical techniques, 88
C.1 Simpson’s rule, 89
C.2 Adaptive interval sizes, 91
C.3 Improper integrals, 93
D A clock for infinity, 95
E References, 98
F Index, 100



DOWNLOAD


This post first appeared on Techelp4u, please read the originial post: here

Share the post

Teach Yourself Scheme in Fixnum Days

×

Subscribe to Techelp4u

Get updates delivered right to your inbox!

Thank you for your subscription

×