-
Notifications
You must be signed in to change notification settings - Fork 1
/
lisp.mm
1752 lines (1748 loc) · 122 KB
/
lisp.mm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<map version="1.0.1">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
<node CREATED="1359821441013" ID="ID_121270593" MODIFIED="1456763663458" TEXT="lisp">
<node CREATED="1359822330426" FOLDED="true" ID="ID_1191675295" MODIFIED="1426771486247" POSITION="right" TEXT="general-purpose Lisp dialects">
<node CREATED="1359821446490" FOLDED="true" HGAP="47" ID="ID_192491919" MODIFIED="1426771478188" TEXT="commonlisp" VSHIFT="-35">
<node CREATED="1359824794847" ID="ID_1173174033" MODIFIED="1359824795825" TEXT="MacLisp"/>
<node CREATED="1359824805308" ID="ID_1148615935" MODIFIED="1359824806797" TEXT="Lisp Machine Lisp"/>
<node CREATED="1359824819366" ID="ID_1949024881" MODIFIED="1359824820177" TEXT="NIL"/>
<node CREATED="1359824830595" ID="ID_149517313" MODIFIED="1359824831469" TEXT="S-1 Lisp"/>
<node CREATED="1359824838937" ID="ID_1509591484" MODIFIED="1359824842659" TEXT="Spice Lisp"/>
<node CREATED="1359824843120" ID="ID_1221499608" MODIFIED="1359824845663" TEXT="Scheme"/>
<node CREATED="1359824875238" ID="ID_1191423077" MODIFIED="1359824877763" TEXT="CLOS">
<node CREATED="1359824870972" ID="ID_853270016" MODIFIED="1359824880473" TEXT="Common Lisp Object System"/>
</node>
<node CREATED="1359824952657" ID="ID_64051369" MODIFIED="1359824953729" TEXT="has a large language standard including many built-in data types, functions, macros and other language elements, as well as an object system"/>
</node>
<node CREATED="1359821448698" FOLDED="true" HGAP="64" ID="ID_1569207664" MODIFIED="1426771419420" TEXT="scheme" VSHIFT="27">
<node CREATED="1359909842510" ID="ID_834476954" MODIFIED="1359909846390" TEXT="statically scoped">
<node CREATED="1359824913454" ID="ID_56356794" MODIFIED="1359909970400" TEXT="lexical scoping"/>
<node CREATED="1359824914849" ID="ID_1277824688" MODIFIED="1359909974076" TEXT="lexical closure"/>
</node>
<node CREATED="1359909851876" ID="ID_1439745575" MODIFIED="1359909863874" TEXT="properly tail-recursive">
<node CREATED="1359824975738" ID="ID_389461876" MODIFIED="1359909980530" TEXT="tail-call optimization"/>
</node>
<node CREATED="1359909881150" ID="ID_886388698" MODIFIED="1359909882586" TEXT="by Guy Lewis Steele Jr. and Gerald Jay Sussman."/>
<node CREATED="1359909930758" FOLDED="true" ID="ID_1717415008" MODIFIED="1426771307389" TEXT="Revisedn Report on the Algorithmic Language Scheme">
<node CREATED="1359909936086" ID="ID_1710460858" MODIFIED="1359909942744" TEXT="r5rs"/>
<node CREATED="1359909943183" ID="ID_850416848" MODIFIED="1359909946015" TEXT="r6rs"/>
<node CREATED="1359909946261" ID="ID_1552541842" MODIFIED="1359909948551" TEXT="r7rs"/>
</node>
<node CREATED="1359909961678" ID="ID_1000766194" MODIFIED="1359909963863" TEXT="Scheme Requests for Implementation"/>
<node CREATED="1359824997112" ID="ID_1506551816" MODIFIED="1359824998033" TEXT="full continuations"/>
<node CREATED="1359825026332" ID="ID_942580519" MODIFIED="1359825027508" TEXT="Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language invented by Guy Lewis Steele Jr. and Gerald Jay Sussman."/>
<node CREATED="1359825136423" ID="ID_1902598796" MODIFIED="1359825137422" TEXT="A wide variety of programming paradigms, including imperative, functional, and message passing styles, find convenient expression in Scheme. Scheme continues to evolve with a series of standards (Revisedn Report on the Algorithmic Language Scheme) and a series of Scheme Requests for Implementation."/>
<node CREATED="1359824973453" ID="ID_618409383" MODIFIED="1359824974610" TEXT="is a more minimalist design, with a much smaller set of standard features but with certain implementation features"/>
<node CREATED="1421215493150" ID="ID_919872060" MODIFIED="1421215497582" TEXT="Racket"/>
</node>
<node CREATED="1359825158012" FOLDED="true" ID="ID_361070915" MODIFIED="1426771422399" TEXT="Clojure">
<node CREATED="1359825222925" ID="ID_334253776" MODIFIED="1359825224346" TEXT="targets the Java Virtual Machine"/>
</node>
</node>
<node CREATED="1359825409158" FOLDED="true" ID="ID_497522646" MODIFIED="1456660260475" POSITION="right" TEXT="innovations">
<node CREATED="1359825413676" FOLDED="true" ID="ID_736051707" MODIFIED="1426771600475" TEXT="first homoiconic programming language">
<node CREATED="1359825454663" ID="ID_1540651601" MODIFIED="1359825457153" TEXT="the primary representation of program code is the same type of list structure that is also used for the main data structures."/>
<node CREATED="1359825484121" ID="ID_1289620114" MODIFIED="1359825485840" TEXT="As a result, Lisp functions can be manipulated, altered or even created within a Lisp program without extensive parsing or manipulation of binary machine code."/>
<node CREATED="1359825526889" ID="ID_291224031" MODIFIED="1359825534874" TEXT="This is generally considered one of the primary advantages of the language with regard to its expressive power, and makes the language amenable to metacircular evaluation."/>
</node>
<node CREATED="1359825581418" ID="ID_642901273" MODIFIED="1359825582478" TEXT="if-then-else structure">
<node CREATED="1359825598140" ID="ID_723390931" MODIFIED="1359825599178" TEXT="inherited by ALGOL, which popularized it"/>
</node>
<node CREATED="1359864031323" ID="ID_1210912148" MODIFIED="1359864034289" TEXT="CLOS">
<node CREATED="1359864039296" ID="ID_786841637" MODIFIED="1359864040599" TEXT="Common Lisp Object System">
<node CREATED="1359825657829" ID="ID_1830654816" MODIFIED="1359864042643" TEXT="The Flavours object system (later CLOS) introduced multiple inheritance.">
<node CREATED="1359825672798" ID="ID_282592572" MODIFIED="1359825674507" TEXT="OOP">
<node CREATED="1359825675662" ID="ID_500412069" MODIFIED="1359825676717" TEXT="Smalltalk">
<node CREATED="1359825678165" ID="ID_1597231529" MODIFIED="1359825682340" TEXT="Alan Kay"/>
</node>
</node>
</node>
</node>
</node>
<node CREATED="1359825707340" ID="ID_1916961592" MODIFIED="1359825708340" TEXT="automatic garbage collection"/>
</node>
<node CREATED="1359863770445" FOLDED="true" ID="ID_1849250775" MODIFIED="1426771864565" POSITION="right" TEXT="culture">
<node CREATED="1359857459336" FOLDED="true" ID="ID_62984359" MODIFIED="1426771791114" TEXT="history">
<node CREATED="1359822377931" FOLDED="true" ID="ID_1208030037" MODIFIED="1426771698538" TEXT="originally specified (in 1958)">
<node CREATED="1359822920155" ID="ID_1815958139" MODIFIED="1359822921345" TEXT="by John McCarthy"/>
<node CREATED="1359822940406" ID="ID_1613853831" MODIFIED="1359857603166" TEXT="at MIT"/>
<node CREATED="1359822963760" ID="ID_634471274" MODIFIED="1359857725404" TEXT="paper in Communications of the ACM in 1960">
<node CREATED="1359822982386" ID="ID_1470629327" MODIFIED="1359822990207" TEXT=""Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I""/>
<node CREATED="1359823000961" ID="ID_974518758" MODIFIED="1359823002031" TEXT=""Part II" was never published"/>
</node>
<node CREATED="1359822966672" ID="ID_621797199" MODIFIED="1359823074377" TEXT=""Turing-complete"">
<node CREATED="1359823104117" ID="ID_919557004" MODIFIED="1359823105279" TEXT="universal Turing machine"/>
</node>
<node CREATED="1359823155185" ID="ID_1314517832" MODIFIED="1359823163982" TEXT=""Information Processing Language"">
<node CREATED="1359823165499" ID="ID_120439903" MODIFIED="1359857702440" TEXT="first artificial intelligence language">
<node CREATED="1359823186225" ID="ID_11011593" MODIFIED="1359823187347" TEXT="1955 or 1956"/>
<node CREATED="1359823202514" ID="ID_1979196798" MODIFIED="1359823203659" TEXT="list-processing and recursion">
<node CREATED="1359823222223" ID="ID_1521274756" MODIFIED="1359823225207" TEXT="came to be used in Lisp"/>
</node>
</node>
</node>
<node CREATED="1359823252168" ID="ID_1022430525" MODIFIED="1359898233088" TEXT="McCarthy's original notation">
<node CREATED="1359823242990" ID="ID_546097029" MODIFIED="1359823254063" TEXT="bracketed "M-expressions"">
<node CREATED="1359823280772" ID="ID_1889921703" MODIFIED="1359823286984" TEXT="translate into">
<node CREATED="1359823278460" ID="ID_1349483376" MODIFIED="1359823287819" TEXT="S-expressions"/>
</node>
<node CREATED="1359823323044" ID="ID_733238700" MODIFIED="1359823324777" TEXT="MLISP">
<node CREATED="1359823337204" ID="ID_1024515398" MODIFIED="1359823342935" TEXT="by">
<node CREATED="1359823344346" ID="ID_155593024" MODIFIED="1359823345784" TEXT="Horace Enea"/>
</node>
</node>
<node CREATED="1359823354470" ID="ID_367532452" MODIFIED="1359823355776" TEXT="CGOL">
<node CREATED="1359823358267" ID="ID_1974259027" MODIFIED="1359823359629" TEXT="by">
<node CREATED="1359823380476" ID="ID_214309179" MODIFIED="1359823381632" TEXT="Vaughan Pratt"/>
</node>
</node>
</node>
</node>
</node>
<node CREATED="1359823395247" FOLDED="true" ID="ID_1674882128" MODIFIED="1426771745826" TEXT="first implemented">
<node CREATED="1359823398778" ID="ID_766304298" MODIFIED="1359823417931" TEXT="by Steve Russell"/>
<node CREATED="1359823427999" ID="ID_275652144" MODIFIED="1359858238740" TEXT="at IBM 704"/>
<node CREATED="1359857878282" ID="ID_122040635" MODIFIED="1383987075879" TEXT=""eval"">
<node CREATED="1359823470871" ID="ID_1005345023" MODIFIED="1359823472064" TEXT="Lisp eval function could be implemented in machine code.">
<node CREATED="1359823512338" ID="ID_1210986097" MODIFIED="1359823513442" TEXT="The result was a working Lisp interpreter which could be used to run Lisp programs, or more properly, 'evaluate Lisp expressions.'"/>
</node>
</node>
<node CREATED="1359823546256" ID="ID_74670916" MODIFIED="1359898241815" TEXT=""car"">
<node CREATED="1359823582641" ID="ID_195931682" MODIFIED="1359857985697" TEXT="Contents of the Address part of Register number">
<node CREATED="1359823694627" ID="ID_1310263914" MODIFIED="1359858213147" TEXT="return the first item in a list."/>
</node>
</node>
<node CREATED="1359823609475" FOLDED="true" ID="ID_934196779" MODIFIED="1426771731529" TEXT=""cdr"">
<node CREATED="1359823612321" ID="ID_1359709926" MODIFIED="1359823613420" TEXT="Contents of the Decrement part of Register number">
<node CREATED="1359823721223" ID="ID_1787369111" MODIFIED="1359858210580" TEXT="return the rest of the list."/>
</node>
</node>
<node CREATED="1359823542123" ID="ID_1702501806" MODIFIED="1426771737469" TEXT="Two assembly language macros for the IBM 704 became the primitive operations for decomposing lists:"car" "cdr"">
<node CREATED="1359823721223" ID="ID_311956324" MODIFIED="1359823725449" TEXT="return the first item in a list and the rest of the list respectively."/>
</node>
<node CREATED="1359823632762" ID="ID_1377546669" MODIFIED="1383987135859" TEXT=""Register" is used here to mean "Memory Register"">
<node CREATED="1359823644817" ID="ID_1635050758" MODIFIED="1359823646531" TEXT="nowadays called "Memory Location"."/>
</node>
</node>
<node CREATED="1359823751520" FOLDED="true" ID="ID_977680480" MODIFIED="1426771756774" TEXT="The first complete Lisp compiler, written in Lisp, was implemented (in 1962)">
<node CREATED="1359823776270" ID="ID_687576707" MODIFIED="1359858428711" TEXT="by Tim Hart and Mike Levin">
<node CREATED="1359823873810" ID="ID_1034537274" MODIFIED="1359823878704" TEXT="The language used in Hart and Levin's memo is much closer to modern Lisp style than McCarthy's earlier code."/>
</node>
<node CREATED="1359823788069" ID="ID_1493738567" MODIFIED="1359823789211" TEXT="at MIT"/>
<node CREATED="1359823838416" ID="ID_1947776710" MODIFIED="1359823839578" TEXT="incremental compilation">
<node CREATED="1359823863300" ID="ID_166977891" MODIFIED="1359823864656" TEXT="This compiler introduced the Lisp model of incremental compilation, in which compiled and interpreted functions can intermix freely."/>
</node>
</node>
<node CREATED="1359823964307" ID="ID_1362989129" MODIFIED="1426771758301" TEXT="garbage collection routines (in 1970s)">
<node CREATED="1359824008976" ID="ID_174479571" MODIFIED="1359859078229" TEXT="by then-MIT graduate student Daniel Edwards">
<node CREATED="1359824041043" ID="ID_453232739" MODIFIED="1359824042824" TEXT="made it practical to run Lisp on general-purpose computing systems, but efficiency was still a problem.">
<node CREATED="1359824074658" ID="ID_116388855" MODIFIED="1359824076137" TEXT="This led to the creation of Lisp machines: dedicated hardware for running Lisp environments and programs. Advances in both computer hardware and compiler technology soon made Lisp machines obsolete."/>
</node>
</node>
<node CREATED="1359823978070" FOLDED="true" ID="ID_1750196159" MODIFIED="1359858693359" TEXT="Lisp was a difficult system to implement with the compiler techniques and stock hardware of the 1970s.">
<node CREATED="1359823981588" ID="ID_1310175727" MODIFIED="1359824004163" TEXT="minimal machine"/>
</node>
</node>
<node CREATED="1359824090667" FOLDED="true" ID="ID_194181283" MODIFIED="1426771769213" TEXT="During the 1980s and 1990s">
<node CREATED="1359824144183" ID="ID_1131293743" MODIFIED="1359824145632" TEXT="Common Lisp">
<node CREATED="1359824163253" ID="ID_1402223359" MODIFIED="1359859191163" TEXT="In 1994, ANSI published the Common Lisp standard">
<node CREATED="1359859194498" ID="ID_1008690268" MODIFIED="1359859194498" TEXT=""ANSI X3.226-1994 Information Technology Programming Language Common Lisp.""/>
</node>
</node>
</node>
<node CREATED="1359822407020" FOLDED="true" ID="ID_1631632700" MODIFIED="1426771776686" TEXT="second-oldest high-level programming language in widespread use today;">
<node CREATED="1359822423644" ID="ID_1262611810" MODIFIED="1359822424710" TEXT="only Fortran is older (by one year)."/>
</node>
<node CREATED="1359822490828" ID="ID_1783131972" MODIFIED="1359913081252" TEXT="lambda (λ) calculus">
<node CREATED="1359859266377" ID="ID_1583881272" MODIFIED="1359859270291" TEXT="Alonzo Church"/>
</node>
<node CREATED="1359859351016" ID="ID_60011522" MODIFIED="1383989340347" TEXT="AI research">
<node CREATED="1359822515246" ID="ID_649816601" MODIFIED="1359822516285" TEXT="favored programming language for artificial intelligence (AI) research."/>
</node>
<node CREATED="1359822542073" ID="ID_391605275" MODIFIED="1383989341131" TEXT="pioneered ideas">
<node CREATED="1359822559133" ID="ID_478588437" MODIFIED="1359822560342" TEXT="tree data structures"/>
<node CREATED="1359822572354" ID="ID_1299730646" MODIFIED="1359822573861" TEXT="automatic storage management"/>
<node CREATED="1359822586358" ID="ID_751301818" MODIFIED="1359822587253" TEXT="dynamic typing"/>
<node CREATED="1359822601397" ID="ID_1375616915" MODIFIED="1359822602331" TEXT="self-hosting compiler"/>
</node>
</node>
<node CREATED="1359822628844" ID="ID_550141649" MODIFIED="1426771858281" TEXT=""LISt Processing"">
<node CREATED="1359822644256" ID="ID_377287838" MODIFIED="1359822645219" TEXT="Linked lists are one of Lisp language's major data structures"/>
<node CREATED="1359822666301" FOLDED="true" ID="ID_1988455559" MODIFIED="1426771840649" TEXT="Lisp source code is itself made up of lists.">
<node CREATED="1359822718501" ID="ID_197306162" MODIFIED="1359822719787" TEXT="As a result, Lisp programs can manipulate source code as a data structure">
<node CREATED="1359822700881" ID="ID_1456688762" MODIFIED="1359822727252" TEXT="giving rise to the macro systems that allow programmers to create new syntax or even new domain-specific languages embedded in Lisp."/>
</node>
</node>
</node>
<node CREATED="1359822351511" ID="ID_1338067592" MODIFIED="1359863785266" TEXT="Polish prefix"/>
<node CREATED="1359822842465" ID="ID_1749220732" MODIFIED="1359863789472" TEXT="program code">
<node CREATED="1359822802100" ID="ID_1913274169" MODIFIED="1359822803074" TEXT="s-expressions"/>
<node CREATED="1359822813427" ID="ID_913803484" MODIFIED="1359822814377" TEXT="parenthesized lists"/>
</node>
<node CREATED="1359822777105" ID="ID_714212110" MODIFIED="1359822778154" TEXT="interchangeability of code and data">
<node CREATED="1359822830986" ID="ID_103982564" MODIFIED="1359822832692" TEXT="gives Lisp its instantly recognizable syntax."/>
</node>
</node>
<node CREATED="1359822982386" FOLDED="true" ID="ID_610220906" MODIFIED="1458224065241" POSITION="right" TEXT=""Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I"">
<node CREATED="1359942106066" FOLDED="true" ID="ID_1664220540" MODIFIED="1426771909000" TEXT=""LISt Processor"">
<node CREATED="1359942148895" ID="ID_1061603346" MODIFIED="1359942165589" TEXT="IBM 704"/>
<node CREATED="1359942171304" ID="ID_1671675021" MODIFIED="1359942210353" TEXT="Artificial Intelligence Group at M.I.T."/>
<node CREATED="1359942326407" ID="ID_1831216444" MODIFIED="1426771882094" TEXT="Advice Taker (Nov. 1958)">
<node CREATED="1359942373387" ID="ID_714635091" MODIFIED="1359942416983" TEXT="declarative sentences"/>
<node CREATED="1359942394735" ID="ID_1564609067" MODIFIED="1359942421226" TEXT="imperative sentences"/>
<node CREATED="1359942551165" ID="ID_391455704" MODIFIED="1359942565932" TEXT=""common sense""/>
</node>
</node>
<node CREATED="1359984523932" FOLDED="true" ID="ID_861077147" MODIFIED="1426771913409" TEXT="partial function">
<node CREATED="1359984634940" ID="ID_1161140212" MODIFIED="1359984692381" TEXT="function that is defined only on part of its domain."/>
</node>
<node CREATED="1359984912457" FOLDED="true" ID="ID_596693558" MODIFIED="1426771989424" TEXT="Conditional Expressions">
<node CREATED="1359984935989" ID="ID_122576740" MODIFIED="1359985139564" TEXT="(p1 → e1 , · · · , pn → en )">
<node CREATED="1359985042920" ID="ID_1148199700" MODIFIED="1359985044185" TEXT="(1 < 2 → 4, 1 > 2 → 3) = 4"/>
<node CREATED="1359985053567" ID="ID_187403284" MODIFIED="1359985054801" TEXT="(2 < 1 → 4, 2 > 1 → 3, 2 > 1 → 2) = 3"/>
<node CREATED="1359985065711" ID="ID_468086495" MODIFIED="1359985066930" TEXT="(2 < 1 → 4, T → 3) = 3"/>
<node CREATED="1359985092707" ID="ID_1138008476" MODIFIED="1359985097529" TEXT="(2 < 1 → 0/0 , T → 3) = 3"/>
<node CREATED="1359985109407" ID="ID_9320212" MODIFIED="1359985114978" TEXT="(2 < 1 → 3, T → 0/0 ) is undefined"/>
<node CREATED="1359985127417" ID="ID_661192955" MODIFIED="1359985128761" TEXT="(2 < 1 → 3, 4 < 1 → 4) is undefined"/>
<node CREATED="1359986068734" ID="ID_888299994" MODIFIED="1421215333834" TEXT="p ∧ q = (p → q, T → F )">
<font NAME="Dialog" SIZE="12"/>
</node>
<node CREATED="1359986087493" ID="ID_323657225" MODIFIED="1359986088992" TEXT="p ∨ q = (p → T, T → q)"/>
<node CREATED="1359986098249" ID="ID_1116682538" MODIFIED="1359986099359" TEXT="¬p = (p → F, T → T )"/>
</node>
</node>
<node CREATED="1359984573658" FOLDED="true" ID="ID_1081424894" MODIFIED="1426771987340" TEXT="Propositional Expressions and Predicates">
<node CREATED="1359984790293" ID="ID_789097681" MODIFIED="1359984811331" TEXT="Propositional Expressions">
<node CREATED="1359984837615" ID="ID_1811736484" MODIFIED="1359984839287" TEXT="expression whose possible values are T (for truth) and F (for falsity)."/>
<node CREATED="1359984863995" ID="ID_1126497017" MODIFIED="1359984865276" TEXT="propositional connectives ∧ (“and”), ∨ (“or”), and ¬ (“not”)."/>
</node>
<node CREATED="1359984811774" ID="ID_1423865529" MODIFIED="1359984815255" TEXT="Predicates">
<node CREATED="1359984890047" ID="ID_834790431" MODIFIED="1359984891297" TEXT="function whose range consists of the truth values T and F"/>
</node>
</node>
<node CREATED="1359985238411" ID="ID_101609202" MODIFIED="1426772011641" TEXT="Recursive Function Definitions">
<node CREATED="1359985278714" ID="ID_606704904" MODIFIED="1359985280276" TEXT="n! = (n = 0 → 1, T → n · (n − 1)!)"/>
<node CREATED="1359985515948" ID="ID_31312050" MODIFIED="1359985517198" TEXT="Euclidean algorithm">
<node CREATED="1359985474409" ID="ID_45238242" MODIFIED="1359985475627" TEXT="gcd(m, n) = (m > n → gcd(n, m), rem(n, m) = 0 → m, T → gcd(rem(n, m), m))"/>
</node>
<node CREATED="1359985544668" ID="ID_1958748422" MODIFIED="1359985546409" TEXT="Newtonian algorithm">
<node CREATED="1359985572873" ID="ID_1461894020" MODIFIED="1359985942533" TEXT="sqrt(a,x,ε) = (|x^2 − a| < ε → x,T → sqrt (a,1/2(x + a/x),ε))"/>
</node>
</node>
<node CREATED="1359987145331" ID="ID_920099597" MODIFIED="1425539503804" TEXT="Functions and Forms">
<node CREATED="1359987225437" ID="ID_1453026926" MODIFIED="1359987228887" TEXT="function">
<node CREATED="1359987442605" ID="ID_1809746680" MODIFIED="1359987450969" TEXT="f(x,y)"/>
</node>
<node CREATED="1359987229048" ID="ID_1652296707" MODIFIED="1359987231624" TEXT="form">
<node CREATED="1359987433814" ID="ID_1588720264" MODIFIED="1359987440477" TEXT="x^2+y"/>
</node>
<node CREATED="1359987430000" ID="ID_978128866" MODIFIED="1359987500678" TEXT="A form can be converted into a function if we can determine the correspondence between the variables occurring in the form and the ordered list of arguments of the desired function.This is accomplished
by Church’s λ-notation.
"/>
<node CREATED="1359987502072" ID="ID_1689007692" MODIFIED="1426772167766" TEXT="λ-notation">
<node CREATED="1359987615835" ID="ID_162806004" MODIFIED="1359987787169" TEXT="λ((x1, · · ·, xn ), ε )">
<node CREATED="1359987763513" ID="ID_141801575" MODIFIED="1359987797668" TEXT="(x1, ..., xn)">
<node CREATED="1359987799936" ID="ID_31033293" MODIFIED="1359987810094" TEXT="ordered argument list"/>
</node>
<node CREATED="1359987812767" ID="ID_652978267" MODIFIED="1359987823556" TEXT="ε ">
<node CREATED="1359987942637" ID="ID_152337299" MODIFIED="1359987944917" TEXT="form"/>
</node>
</node>
<node CREATED="1359987949930" ID="ID_1633581346" MODIFIED="1359987975937" TEXT="λ((x, y), y^2 + x)">
<node CREATED="1359987990155" ID="ID_1652849269" MODIFIED="1359988017488" TEXT="λ((x, y), y^2 + x)(3, 4) = 19"/>
</node>
<node CREATED="1359988668124" ID="ID_1622431168" MODIFIED="1383987708225" TEXT="bound variables">
<node CREATED="1359988699200" ID="ID_845011896" MODIFIED="1359988714037" TEXT="lexical static"/>
</node>
<node CREATED="1359988674091" ID="ID_605894770" MODIFIED="1388803166082" TEXT="unbound variables">
<node CREATED="1359988716321" ID="ID_1392551758" MODIFIED="1383987683259" TEXT="dynamic static "/>
<node CREATED="1359989259287" ID="ID_790812604" MODIFIED="1359989262612" TEXT="closure"/>
</node>
</node>
</node>
<node CREATED="1359989645443" ID="ID_1690302061" MODIFIED="1425539501487" TEXT="Expressions for Recursive Functions">
<node CREATED="1359990359840" ID="ID_517530878" MODIFIED="1383987740309" TEXT="label(a, ε )">
<node CREATED="1359990381984" ID="ID_1379801763" MODIFIED="1359990424790" TEXT="a within the expression stands for the expression as a whole"/>
<node CREATED="1359990426496" ID="ID_1835360393" MODIFIED="1359990504116" TEXT="ε λ-expression"/>
<node CREATED="1359990555953" HGAP="22" ID="ID_551656521" MODIFIED="1359990635640" TEXT="(define factorial (lambda (n) (cond ((<= n 1) 1) (else (* n (factorial(- n 1))))))) " VSHIFT="5">
<node CREATED="1359990832726" ID="ID_77412700" MODIFIED="1359990838563" TEXT="scheme"/>
</node>
</node>
</node>
<node CREATED="1359991508607" ID="ID_981165462" MODIFIED="1425539508218" TEXT="Recursive Functions of Symbolic Expressions">
<node CREATED="1359991537865" ID="ID_1474854272" MODIFIED="1383987875709" TEXT="S-expressions">
<node CREATED="1359991545283" ID="ID_1007358520" MODIFIED="1359991546455" TEXT="symbolic expressions"/>
<node CREATED="1359991782060" ID="ID_1477450850" MODIFIED="1359991860281" TEXT="S-expressions are formed by using the special characters "·" ,")", "(" and an infinite set of distinguishable atomic symbols. For atomic symbols, we shall use strings of capital Latin letters and digits with single imbedded blanks."/>
<node CREATED="1359992259694" ID="ID_826148155" MODIFIED="1359992261693" TEXT="defined as follows:">
<node CREATED="1359992266796" ID="ID_1065905095" MODIFIED="1359992289293" TEXT="1. Atomic symbols are S-expressions."/>
<node CREATED="1359992371284" ID="ID_1997343838" MODIFIED="1359992372705" TEXT="2. If e1 and e2 are S-expressions, so is (e1· e2)."/>
</node>
<node CREATED="1359991591974" ID="ID_880224263" MODIFIED="1360062950366" TEXT="in term of">
<node CREATED="1359991549994" ID="ID_719815115" MODIFIED="1359991571353" TEXT="ordered pairs">
<node CREATED="1359992462177" ID="ID_985157543" MODIFIED="1359992464176" TEXT="(m1 · (m2 · (· · · (mn · NIL) · · ·)))">
<node CREATED="1359992823598" ID="ID_1415877917" MODIFIED="1359992832781" TEXT="NIL is an atomic symbol used to terminate lists."/>
</node>
</node>
<node CREATED="1359991571780" ID="ID_613061464" MODIFIED="1359991588723" TEXT="lists">
<node CREATED="1359992435977" ID="ID_1053337563" MODIFIED="1359992445370" TEXT="(m1, m2 , · · · , mn)"/>
<node CREATED="1359992883892" ID="ID_68375315" MODIFIED="1359992920223" TEXT="list notations are abbreviations for S-expressions.">
<node CREATED="1359992944518" ID="ID_1458206249" MODIFIED="1359993120450" TEXT="(m) stands for (m ·NIL)."/>
<node CREATED="1359993106392" ID="ID_1574020095" MODIFIED="1359993118562" TEXT="(m1 , · · · , mn ) stands for (m1 · (· · · (mn · NIL) · · ·))."/>
<node CREATED="1359993121313" ID="ID_1209540672" MODIFIED="1359993158974" TEXT="(m1 , · · · , mn · x) stands for (m1 · (· · · (mn · x) · · ·))."/>
</node>
</node>
</node>
</node>
<node CREATED="1359993221489" FOLDED="true" ID="ID_1694438666" MODIFIED="1458224065235" TEXT="S-functions/M-expressions">
<node CREATED="1359995396924" ID="ID_1740833419" MODIFIED="1421215402707" TEXT="M-expressions">
<node CREATED="1359994521068" ID="ID_1727587271" MODIFIED="1359995409148" TEXT="meta-expressions"/>
<node CREATED="1359994355013" ID="ID_341708541" MODIFIED="1359995404328" TEXT="use sequences of lower-case letters for function names and variables ranging over the set of S-expressions. We also use brackets and semicolons, instead of parentheses and commas, for denoting the application of functions to their arguments.any S-expression that occur stand for themselves.">
<node CREATED="1359994469471" ID="ID_1315261617" MODIFIED="1359994470814" TEXT="car[x]"/>
<node CREATED="1359994482661" ID="ID_1842342579" MODIFIED="1359994484160" TEXT="car[cons[(A · B); x]]"/>
</node>
</node>
<node CREATED="1359995372167" FOLDED="true" ID="ID_1108481965" MODIFIED="1426772591608" TEXT="S-functions">
<node CREATED="1359994283869" ID="ID_1999711787" MODIFIED="1359995384758" TEXT="functions of S-expressions"/>
<node CREATED="1359994591104" FOLDED="true" ID="ID_375948518" MODIFIED="1426772430847" TEXT="five elementary S-functions">
<node CREATED="1359994596073" ID="ID_1523663444" MODIFIED="1383988296034" TEXT="atom">
<icon BUILTIN="full-1"/>
<node CREATED="1359994625986" ID="ID_905913355" MODIFIED="1359994665472" TEXT="atom[x] has the value of T or F according to whether x is an atomic symbol"/>
<node CREATED="1359994687403" ID="ID_710745745" MODIFIED="1359994688591" TEXT="atom [X] = T"/>
<node CREATED="1359994688987" ID="ID_1514737934" MODIFIED="1359994699628" TEXT="atom [(X · A)] = F"/>
</node>
<node CREATED="1359994724017" ID="ID_1999316084" MODIFIED="1388803763284" TEXT="eq">
<icon BUILTIN="full-2"/>
<node CREATED="1359994770793" ID="ID_160466449" MODIFIED="1359994772340" TEXT="eq [x;y] is defined if and only if both x and y are atomic. eq [x; y] = T if x and y are the same symbol, and eq [x; y] = F otherwise."/>
<node CREATED="1359994785309" ID="ID_1911410132" MODIFIED="1359994812705" TEXT="eq [X; X] = T"/>
<node CREATED="1359994828466" ID="ID_21357253" MODIFIED="1359994829529" TEXT="eq [X; A] = F"/>
<node CREATED="1359994839285" ID="ID_193433203" MODIFIED="1359994840395" TEXT="eq [X; (X · A)] is undefined."/>
</node>
<node CREATED="1359994852350" ID="ID_707470218" MODIFIED="1426772414582" TEXT="car">
<icon BUILTIN="full-3"/>
<node CREATED="1359994873371" ID="ID_157886591" MODIFIED="1359994923020" TEXT="car[x] is defined if and only if x is not atomic. car [(e1 · e2)] = e1 ."/>
<node CREATED="1359994924680" ID="ID_608841179" MODIFIED="1359994925774" TEXT="car [X] is undefined."/>
<node CREATED="1359994911693" ID="ID_1132311371" MODIFIED="1359994913395" TEXT="car [(X · A)] = X"/>
<node CREATED="1359994935561" ID="ID_840019156" MODIFIED="1359994936655" TEXT="car [((X · A) · Y )] = (X · A)"/>
</node>
<node CREATED="1359994949421" ID="ID_1346828371" MODIFIED="1426772425775" TEXT="cdr">
<icon BUILTIN="full-4"/>
<node CREATED="1359994977681" ID="ID_831132773" MODIFIED="1359994992581" TEXT="cdr [x] is also defined when x is not atomic. We have cdr [(e1 · e2)] =e2 ."/>
<node CREATED="1359994996549" ID="ID_1809987371" MODIFIED="1359995005053" TEXT="cdr[X] is undefined"/>
<node CREATED="1359995005355" ID="ID_71502861" MODIFIED="1359995052906" TEXT="cdr [(X · A)] = A"/>
<node CREATED="1359995072303" ID="ID_289652692" MODIFIED="1359995073709" TEXT="cdr [((X · A) · Y )] = Y"/>
</node>
<node CREATED="1359995102606" ID="ID_1933203663" MODIFIED="1388811375413" TEXT="cons">
<icon BUILTIN="full-5"/>
<node CREATED="1359995109244" ID="ID_1963330322" MODIFIED="1359995138074" TEXT="cons [x; y] is defined for any x and y. We have cons [e1 ; e ] = (e1 · e2 )."/>
<node CREATED="1359995157502" ID="ID_551145138" MODIFIED="1359995158830" TEXT="cons [X; A] = (X A)"/>
<node CREATED="1359995172455" ID="ID_475194891" MODIFIED="1359995173502" TEXT="cons [(X · A); Y ] = ((X · A)Y )"/>
<node CREATED="1359995210730" ID="ID_1296321446" MODIFIED="1359995211980" TEXT="car [cons [x; y]] = x"/>
<node CREATED="1359995222952" ID="ID_505718047" MODIFIED="1359995223937" TEXT="cdr [cons [x; y]] = y"/>
<node CREATED="1359995237608" ID="ID_1845466120" MODIFIED="1359995238796" TEXT="cons [car [x]; cdr [x]] = x, provided that x is not atomic."/>
</node>
</node>
<node CREATED="1359995473150" ID="ID_1780997375" MODIFIED="1426772431894" TEXT="recursive S-functions">
<node CREATED="1359995530246" ID="ID_1763570149" MODIFIED="1359995531683" TEXT="form new functions of S-expressions by conditional expressions and recursive definition."/>
<node CREATED="1359995597615" ID="ID_512661049" MODIFIED="1426772447430" TEXT="ff [x]">
<node CREATED="1359995642309" ID="ID_458133531" MODIFIED="1359995643637" TEXT="The value of ff[x] is the first atomic symbol of the S-expression x with the parentheses ignored."/>
<node CREATED="1359995654032" ID="ID_1765755684" MODIFIED="1359995655392" TEXT="ff[((A · B) · C )] = A"/>
<node CREATED="1359995670249" ID="ID_242640287" MODIFIED="1359995671577" TEXT="ff[x] = [atom[x] → x; T → ff[car[x]]]"/>
<node CREATED="1359999640047" ID="ID_1713402290" MODIFIED="1359999641459" TEXT="(defun ff(x) (cond ((atom x) x) ((ff (car x)))))">
<node CREATED="1359999649654" ID="ID_680152359" MODIFIED="1359999653754" TEXT="clisp"/>
</node>
</node>
<node CREATED="1359995725574" FOLDED="true" ID="ID_887100055" MODIFIED="1383988501825" TEXT="subst [x; y; z]">
<node CREATED="1359995741744" ID="ID_1195313056" MODIFIED="1359995768437" TEXT="This function gives the result of substituting the S-expression x for all occurrences of the atomic symbol y in the S-expression z."/>
<node CREATED="1359995770175" ID="ID_1277666233" MODIFIED="1359996277744">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
subst[x;y;z]=[atom[z] → [ eq[z;y] → x; T→ z ];
</p>
<p>
                     T→ cons[subst[x;y;car[z]];subst[x;y;cdr[z]]]
</p>
</body>
</html></richcontent>
</node>
<node CREATED="1360002415055" ID="ID_959687922" MODIFIED="1360002416742" TEXT="(defun subst(x y z)(cond ((atom z)(cond ((= z y) x) ((z)))) ((cons (subst x y (cdr z)) (subst x y (cdr z)))))) "/>
</node>
<node CREATED="1360031196653" FOLDED="true" ID="ID_1267745853" MODIFIED="1388811444110" TEXT="equal [x; y]">
<node CREATED="1360031254552" ID="ID_106929813" MODIFIED="1360031255989" TEXT="This is a predicate that has the value T if x and y are the same S-expression, and has the value F otherwise."/>
<node CREATED="1360034499321" ID="ID_1999705663" MODIFIED="1360034536658">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
(defun equal0(x y)
</p>
<p>
(cond ((and (atom x) (atom y) (eq x y)) T )
</p>
<p>
          ((and (not (atom x)) (not (atom y)))
</p>
<p>
              (and (equal0 (car x) (car y))
</p>
<p>
                      (equal0 (cdr x) (cdr y))))
</p>
<p>
          (NIL)))
</p>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1360036129513" ID="ID_318062595" MODIFIED="1388811383617" TEXT="null [x]">
<node CREATED="1360044371461" ID="ID_1738061961" MODIFIED="1360044407866" TEXT="null is true if its argument is () "NIL""/>
<node CREATED="1360036137367" ID="ID_1306659515" MODIFIED="1360036287204" TEXT="[atom[x] ∧eq[x;NIL] →T;T→F]"/>
<node CREATED="1360044430999" ID="ID_1710844667" MODIFIED="1388811454318" TEXT="(defun null (x) (and (atom x) (eq x NIL)))"/>
</node>
<node CREATED="1360044686871" ID="ID_677504482" MODIFIED="1388822267728" TEXT="c[ad]+r [x]">
<node CREATED="1360044799572" ID="ID_666645101" MODIFIED="1360044806218" TEXT="car[x]"/>
<node CREATED="1360044806521" ID="ID_171299501" MODIFIED="1360044819143" TEXT="caar[x]=car[car[x]]"/>
<node CREATED="1360044820778" ID="ID_1679476201" MODIFIED="1360044846874" TEXT="caaar[x]=car[car[car[x[car[x]]]]"/>
<node CREATED="1360044881834" ID="ID_1947581976" MODIFIED="1360044891357" TEXT="cadr[x]=car[cdr[x]]"/>
<node CREATED="1360044909987" ID="ID_1871780073" MODIFIED="1360044929797" TEXT="caddr[x]=car[cdr[cdr[x]]]"/>
<node CREATED="1360044992198" ID="ID_1163954403" MODIFIED="1360045007842" TEXT="cdddr[x]=cdr[cdr[cdr[x]]]"/>
</node>
<node CREATED="1360045049246" FOLDED="true" ID="ID_209795601" MODIFIED="1360076432021" TEXT="append [x;y]">
<node CREATED="1360045133863" ID="ID_1217625306" MODIFIED="1360045357994" TEXT="append [x; y] = [null[x] → y; T → cons [car [x]; append [cdr [x]; y]]]"/>
<node CREATED="1360045769239" ID="ID_493558608" MODIFIED="1360045782908">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
(defun append0(x y)
</p>
<p>
       (cond ((null x) y)
</p>
<p>
             ((cons (car x) (append0 (cdr x) x)))
</p>
<p>
       )
</p>
<p>
)
</p>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1360045805859" FOLDED="true" ID="ID_1452758271" MODIFIED="1360076432864" TEXT="among [x; y]">
<node CREATED="1360045833167" ID="ID_1993700650" MODIFIED="1360045834488" TEXT="This predicate is true if the S-expression x occurs among the elements of the list y."/>
<node CREATED="1360045865891" ID="ID_1028860010" MODIFIED="1360046175982" TEXT="among[x; y] = ¬null[y] ∧ [equal[x; car[y]] ∨ among[x; cdr[y]]]"/>
<node CREATED="1360047142926" ID="ID_1464835315" MODIFIED="1360047148628" TEXT="(defun among0(x y) (or (and (not (null y)) (equal x (car y))) (among0 x (cdr y))))"/>
</node>
<node CREATED="1360047347962" FOLDED="true" ID="ID_936369965" MODIFIED="1360076435079" TEXT="pair [x; y]">
<node CREATED="1360047378467" ID="ID_32927240" MODIFIED="1360047394088" TEXT="pair [x;y]. This function gives the list of pairs of corresponding elements of the lists x and y."/>
<node CREATED="1360047438900" ID="ID_700251130" MODIFIED="1360051145521" TEXT="pair [x; y] = [ ¬null[x]∧¬null[y] → cons [cons [car [x]; car[y]]; pair [cdr[x];cdr[y]]]"/>
<node CREATED="1360064681496" ID="ID_1470478084" MODIFIED="1360064734241" TEXT="(defun pair(x y)
 (cond ((and (not (null x)) (not (null y))) 
 (cons (list (car x) (car y)) (pair (cdr x) (cdr y))))))"/>
</node>
<node CREATED="1360065077783" ID="ID_862380309" MODIFIED="1360080136926" TEXT="assoc [x;y]">
<node CREATED="1360065278025" ID="ID_1653933512" MODIFIED="1360065307082" TEXT="If y is a list of the form ((u1 , v1 ), · · · , (un , vn )) and x is one of the u’s, then assoc [x; y] is the corresponding v."/>
<node CREATED="1360065309287" ID="ID_725302121" MODIFIED="1360065862705" TEXT="assoc [x; y] = [¬atom [y]→[eq[x; car[y]] → cdar[y]; assoc [x;cdr[y]]]]"/>
<node CREATED="1360075572583" ID="ID_1786197008" MODIFIED="1360075619237">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
(defun assoc0(x y)
</p>
<p>
       (cond ((not (atom y))
</p>
<p>
             (cond ((eq x (caar y))
</p>
<p>
                   (cadar y))
</p>
<p>
             ((assoc0 x (cdr y))))
</p>
<p>
       )
</p>
<p>
             (NIL)
</p>
<p>
       )
</p>
<p>
)
</p>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1360076439234" FOLDED="true" ID="ID_1148435372" MODIFIED="1360078496939" TEXT="sublis[x; y]">
<node CREATED="1360076467197" ID="ID_1307709385" MODIFIED="1360076469243" TEXT="Here x is assumed to have the form of a list of pairs ((u 1 , v 1 ), · · · , (u n , v n )), where the u’s are atomic, and y may be any S-expression. The value of sublis[x; y] is the result of substituting each v for the correspond-ing u in y."/>
<node CREATED="1360076480730" ID="ID_1407343674" MODIFIED="1360076482012" TEXT="sub2[x; z] = [null[x] → z; eq[caar[x]; z] → cadar[x]; T → sub2[cdr[x]; z]]"/>
<node CREATED="1360076888061" ID="ID_215229523" MODIFIED="1360076903835">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
(defun sub2(x y)
</p>
<p>
       (cond ((null x) y)
</p>
<p>
             ((eq (caar x) y) (cadar x))
</p>
<p>
             ((sub2 (cdr x) y))
</p>
<p>
       )
</p>
<p>
)
</p>
</body>
</html></richcontent>
</node>
<node CREATED="1360076885292" ID="ID_447537408" MODIFIED="1360076886792" TEXT="sublis[x; y] = [atom[y] → sub2[x; y]; T → cons[sublis[x; car[y]]; sublis[x; cdr[y]]]"/>
<node CREATED="1360076906758" ID="ID_683282762" MODIFIED="1360078495239">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
(defun sublis0(x y)
</p>
<p>
       (cond ((and (not (null y)))
</p>
<p>
             (cons (sub2 x (car y)) (sublis0 x (cdr y))))
</p>
<p>
       )
</p>
<p>
)
</p>
</body>
</html></richcontent>
</node>
</node>
</node>
</node>
<node CREATED="1360078703521" ID="ID_1940938134" MODIFIED="1426772500803" TEXT="M-expressions(ε) 2 S-expressions(ε*)">
<node CREATED="1360078816278" ID="ID_219273084" MODIFIED="1383989095684" TEXT="1. If ε is an S-expression ε* is (QUOTE, ε).">
<font NAME="Dialog" SIZE="12"/>
</node>
<node CREATED="1360078866494" ID="ID_365570511" MODIFIED="1383989095677" TEXT="2. Variables and function names that were represented by strings of lower-case letters are translated to the corresponding strings of the corresponding uppercase letters. Thus car* is CAR, and subst* is SUBST.">
<font NAME="Dialog" SIZE="12"/>
</node>
<node CREATED="1360078897944" ID="ID_9741611" MODIFIED="1383989095669" TEXT="3. A form f [e1 ; · · · ; en ] is translated to (f∗ , e1∗ · · · , e2∗). Thus cons [car [x]; cdr [x]]∗ is (CONS, (CAR, X), (CDR, X)).">
<font NAME="Dialog" SIZE="12"/>
</node>
<node CREATED="1360078954673" ID="ID_1518990141" MODIFIED="1383989219060" TEXT="4. {[p1 → e1 ; · · · ; pn → en ]}∗ is (COND, (p1*∗, e1* ), · · · , (pn* · en*)).">
<font NAME="Dialog" SIZE="12"/>
</node>
<node CREATED="1360079023275" ID="ID_1361591073" MODIFIED="1383989095668" TEXT="5. {λ[[x1 ; · · · ; xn ]; ε ]}∗ is (LAMBDA, (x1* , · · · , xn* ), ε∗ ).">
<font NAME="Dialog" SIZE="12"/>
</node>
<node CREATED="1360079113508" ID="ID_631493170" MODIFIED="1383989095664" TEXT="6. {label[a; ε]}∗ is (LABEL, a∗ , ε∗ ).">
<font NAME="Dialog" SIZE="12"/>
</node>
</node>
<node CREATED="1360082287799" ID="ID_811104006" MODIFIED="1426772571429" TEXT="Functions with Functions as Arguments">
<node CREATED="1360079627994" ID="ID_1925937725" MODIFIED="1421215415159" TEXT="The Universal S-Function apply">
<node CREATED="1360079657345" ID="ID_1030238103" MODIFIED="1360079727641" TEXT="There is an S-function apply with the property that if f is an S-expression for an S-function f' and args is a list of arguments of the form (arg1 , · · · , argn ), where arg1 , · · · , argn are arbitrary S-expressions, then apply[f ; args] and f' [arg1 ; · · · ; argn ] are defined for the same values of arg1 , · · · , argn , and are equal when defined. ">
<node CREATED="1360079770586" ID="ID_1136599591" MODIFIED="1360079789869" TEXT="(apply #'sublis0 '(((a 0) (b 1)) (a a b a b)))"/>
</node>
<node CREATED="1360079729487" ID="ID_1562480910" MODIFIED="1360079768021" TEXT="S-function apply is defined by">
<node CREATED="1360079792667" ID="ID_1162361377" MODIFIED="1360079832917" TEXT="apply[f ; args] = eval[cons[f ; appq[args]]; NIL]">
<node CREATED="1360079887695" ID="ID_339479306" MODIFIED="1360079916487" TEXT="appq[m] = [null[m] → NIL; T → cons[list[QUOTE; car[m]]; appq[cdr[m]]]]"/>
</node>
</node>
</node>
<node CREATED="1360080019336" FOLDED="true" ID="ID_163853769" MODIFIED="1426772573392" TEXT="eval">
<node CREATED="1360080028298" ID="ID_1174693705" MODIFIED="1360080931825">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
eval[e; a] = [
</p>
<p>
     atom [e] → assoc [e; a];
</p>
<p>
     atom [car [e]] → [
</p>
<p>
           eq [car [e]; QUOTE] → cadr [e];
</p>
<p>
           eq [car [e]; ATOM] → atom [eval [cadr [e]; a]];
</p>
<p>
           eq [car [e]; EQ] → [eval [cadr [e]; a] = eval [caddr [e]; a]];
</p>
<p>
           eq [car [e]; COND] → evcon [cdr [e]; a];
</p>
<p>
           eq [car [e]; CAR] → car [eval [cadr [e]; a]];
</p>
<p>
           eq [car [e]; CDR] → cdr [eval [cadr [e]; a]];
</p>
<p>
           eq [car [e]; CONS] → cons [eval [cadr [e]; a]; eval [caddr [e];a]];
</p>
<p>
           T → eval [cons [assoc [car [e]; a]; evlis [cdr [e]; a]]; a]];
</p>
<p>
    eq [caar [e]; LABEL] → eval [cons [caddar [e]; cdr [e]];cons [list [cadar [e]; car [e]; a]];
</p>
<p>
    eq [caar [e]; LAMBDA] → eval [caddar [e];append [pair [cadar [e]; evlis [cdr [e]; a]; a]]]
</p>
</body>
</html></richcontent>
<node CREATED="1360080950636" ID="ID_706114027" MODIFIED="1360080963528" TEXT="evlis[m; a] = [null[m] → NIL; T → cons[eval[car[m]; a]; evlis[cdr[m]; a]]]"/>
<node CREATED="1360080933874" ID="ID_1610437508" MODIFIED="1360080949071" TEXT="evcon[c; a] = [eval[caar[c]; a] → eval[cadar[c]; a]; T → evcon[cdr[c]; a]] and"/>
</node>
</node>
<node CREATED="1360082339100" ID="ID_1023877193" MODIFIED="1360082342019" TEXT="map"/>
<node CREATED="1360082361899" ID="ID_627371208" MODIFIED="1360082363321" TEXT="reduce"/>
</node>
</node>
</node>
<node CREATED="1360082411437" ID="ID_583213007" MODIFIED="1360082413373" TEXT="The LISP Programming System"/>
</node>
<node CREATED="1388794055523" ID="ID_1600847080" MODIFIED="1456660260502" POSITION="right" TEXT="PLT(scheme)/Racket">
<node CREATED="1388794343432" ID="ID_390841354" MODIFIED="1393255550514" TEXT="function">
<node CREATED="1388794367255" ID="ID_980676057" MODIFIED="1388794390878" TEXT="(define (func arg1 arg2 ... argn) (expr))"/>
<node CREATED="1393258073797" ID="ID_1997928705" MODIFIED="1393258180203" TEXT="lambda expr:(lambda <formals> <body>)">
<node CREATED="1393258225161" ID="ID_1708457841" MODIFIED="1393258229271" TEXT="formals">
<node CREATED="1393258220824" ID="ID_739991171" MODIFIED="1393258412351" TEXT="(<variable1>...<variableN> ): {n,n}-arity"/>
<node CREATED="1393258302373" ID="ID_1690242801" MODIFIED="1393258349708" TEXT="<variable>: {0,}-arity"/>
<node CREATED="1393258377454" ID="ID_1656981281" MODIFIED="1393258448651" TEXT="(<variable1>...<variableN> . <variableN+1>): {n,}-arity"/>
</node>
</node>
</node>
<node CREATED="1393643913457" ID="ID_517449123" MODIFIED="1426771136903" TEXT="binding {define|set!|let}">
<node CREATED="1393643995958" ID="ID_882206626" MODIFIED="1393644060716" TEXT="define (decl )">
<node CREATED="1388794402517" ID="ID_299443090" MODIFIED="1393643999898" TEXT="(define var (expr));declaration: var a int=4//go"/>
</node>
<node CREATED="1393644065027" ID="ID_527121096" MODIFIED="1393644073250" TEXT="set! (assign)">
<node CREATED="1388824827107" ID="ID_1639524614" MODIFIED="1393644074630" TEXT="(set! var (expr));assignment: a=5//go"/>
</node>
<node CREATED="1388826151172" FOLDED="true" ID="ID_1753424879" MODIFIED="1426771144678" TEXT="let (local)">
<node CREATED="1388824852084" ID="ID_1316097330" MODIFIED="1388826153928" TEXT="(let ((var value)) var);local: a:=4"/>
<node CREATED="1388826225444" ID="ID_1507541462" MODIFIED="1388826336853" TEXT="(let{,*,rec} ((var init-expr)...) (expr))"/>
<node CREATED="1388826210357" ID="ID_1671556153" MODIFIED="1388826361488" TEXT="if binding is two step, first is init, second is assignment"/>
<node CREATED="1388826155533" ID="ID_604775911" MODIFIED="1388826394089" TEXT="let: bind after all init"/>
<node CREATED="1388826157303" ID="ID_1847983934" MODIFIED="1388826482447" TEXT="let*: bind one by one"/>
<node CREATED="1388826160913" ID="ID_974728304" MODIFIED="1388826498363" TEXT="letrec:bind when init can be computed"/>
</node>
</node>
<node CREATED="1393643866134" ID="ID_362792123" MODIFIED="1456660263227" TEXT="data {list|vector|struct}">
<node CREATED="1388794356725" ID="ID_1840167971" MODIFIED="1564409712819" TEXT="struct">
<node CREATED="1388838149528" ID="ID_54517549" MODIFIED="1388838163110" TEXT="construct struct using closures"/>
</node>
<node CREATED="1388799167667" FOLDED="true" ID="ID_838895970" MODIFIED="1456665222329" TEXT="list(linked)">
<node CREATED="1388799169756" ID="ID_1695709453" MODIFIED="1426771154766" TEXT="cons">
<node CREATED="1388799290337" ID="ID_1244684245" MODIFIED="1388799340062" TEXT="(cons 1 (cons 2 (cons 3 (cons 4 empty))))"/>
</node>
<node CREATED="1388799384598" ID="ID_1485079120" MODIFIED="1388804124853" TEXT="list">
<node CREATED="1388799178579" ID="ID_1597810735" MODIFIED="1388799386324" TEXT="(list 1 2 3 4)"/>
</node>
<node CREATED="1388799180164" ID="ID_770885317" MODIFIED="1393255213794" TEXT="'(literal) `(literal interpolation) ,(folding) ,@(unfolding)">
<node CREATED="1388799393321" ID="ID_1232299146" MODIFIED="1388799410762" TEXT="'(1 2 3 4)"/>
<node CREATED="1388799418246" ID="ID_1061398518" MODIFIED="1388799721631" TEXT="`(,@'(1 2),@'(3 4))"/>
<node CREATED="1388799723455" ID="ID_501158931" MODIFIED="1388799730903" TEXT="`(,1,2,3,4)"/>
</node>
<node CREATED="1388799739410" ID="ID_1604274011" MODIFIED="1388799743219" TEXT="car/first"/>
<node CREATED="1388799743483" ID="ID_537065582" MODIFIED="1388799747977" TEXT="cdr/rest"/>
<node CREATED="1388803945621" ID="ID_600402571" MODIFIED="1425539344191" TEXT="empty list">
<node CREATED="1388803907850" ID="ID_1001285317" MODIFIED="1388804029849" TEXT=" r5rs: '()"/>
<node CREATED="1388803924080" ID="ID_1321634983" MODIFIED="1388804045964" TEXT="lisp:nil"/>
<node CREATED="1388803926585" ID="ID_1883668187" MODIFIED="1388804054933" TEXT="how:empty"/>
</node>
<node CREATED="1388804067903" ID="ID_768187648" MODIFIED="1425539373593" TEXT="null? pair? list?">
<node CREATED="1388804100114" ID="ID_1536761915" MODIFIED="1388804186485" TEXT="(define (null? x) (eq x nil))"/>
<node CREATED="1388804190043" ID="ID_601047775" MODIFIED="1388804302450" TEXT="(define (list? x) (or (not (atom x)) (eq x nil)))"/>
<node CREATED="1388804287962" ID="ID_1626421169" MODIFIED="1388804325918" TEXT="(define (pair? x) (not (atom x))"/>
<node CREATED="1425539649403" ID="ID_168859989" MODIFIED="1425539690245" TEXT="atom not exist, but {number,symbol,string,pair,null}? etc. instead"/>
</node>
</node>
<node CREATED="1388837797890" ID="ID_1882810839" MODIFIED="1426771188124" TEXT="vector(sequential)">
<node CREATED="1388837868659" ID="ID_1720976883" MODIFIED="1388837910357" TEXT="literal: '#(1 '(1 3) 'string)"/>
<node CREATED="1388837941575" ID="ID_439619727" MODIFIED="1388837987321" TEXT="(make-vector k)"/>
<node CREATED="1388838009352" ID="ID_466315671" MODIFIED="1388838022578" TEXT="(vector obj...)"/>
<node CREATED="1388837920530" ID="ID_1291443117" MODIFIED="1388837932784" TEXT="(vector? v)"/>
<node CREATED="1388837956704" ID="ID_1143053571" MODIFIED="1388838036241" TEXT="(make-vector k fill)"/>
<node CREATED="1388838040661" ID="ID_449701833" MODIFIED="1388838047348" TEXT="(make-vector k)"/>
<node CREATED="1388837983505" ID="ID_1614643528" MODIFIED="1388838054636" TEXT="(vector-ref v i)"/>
<node CREATED="1388838071501" ID="ID_1467399906" MODIFIED="1388838089569" TEXT="(vector-set! v i obj)"/>
<node CREATED="1388838102832" ID="ID_70322554" MODIFIED="1388838112555" TEXT="(vector->list v)"/>
<node CREATED="1388838113171" ID="ID_1696086579" MODIFIED="1388838132351" TEXT="(vector-fill! v obj)"/>
</node>
</node>
<node CREATED="1388824815393" ID="ID_1329134336" MODIFIED="1456763672524" TEXT="cond">
<node CREATED="1388794798256" ID="ID_205934389" MODIFIED="1388825228154" TEXT="(cond ((bool-expr) (expr)) ((bool-expr) (expr))...(else (expr) ))"/>
<node CREATED="1393643781615" ID="ID_976800980" MODIFIED="1393643782567" TEXT="case"/>
<node CREATED="1393643782823" ID="ID_916389073" MODIFIED="1393643783573" TEXT="if"/>
</node>
<node CREATED="1388825021533" ID="ID_564441274" MODIFIED="1564415277373" TEXT="loop">
<node CREATED="1388825232918" ID="ID_1174490374" MODIFIED="1388825703060" TEXT="(do ( (sum 0 (+ sum i)) (i 1 (+ i 1))) ((> i 100) sum)'())"/>
<node CREATED="1388825778196" ID="ID_447485133" MODIFIED="1388825779331" TEXT="do ((<variable1> <init1> <step1>) ...) (<test> <expression> ...) <command> ...)"/>
</node>
<node CREATED="1393643848062" ID="ID_1897867985" MODIFIED="1393643851043" TEXT="begin"/>
<node CREATED="1388826883506" ID="ID_1680711256" MODIFIED="1388826888213" TEXT="I/O"/>
<node CREATED="1359911170902" ID="ID_1960405771" MODIFIED="1426771214826" TEXT="Racket">
<node CREATED="1361889406379" ID="ID_1985823693" MODIFIED="1361889425067" TEXT="(circle radius)"/>
<node CREATED="1361889436959" ID="ID_1889771983" MODIFIED="1361889492258" TEXT="(rectangle length width)"/>
<node CREATED="1361890521168" ID="ID_1251573246" MODIFIED="1361890785002" TEXT="(filled-rectangle length width)"/>
<node CREATED="1361889493540" ID="ID_963317932" MODIFIED="1361890115534" TEXT="horizontal ">
<node CREATED="1361890139177" ID="ID_1019357842" MODIFIED="1361890163155" TEXT="(hc-append [d] pict ...)"/>
<node CREATED="1361890164838" ID="ID_31996568" MODIFIED="1361890177423" TEXT="(ht-append [d] pict ...)"/>
<node CREATED="1361890178102" ID="ID_348535004" MODIFIED="1361890193934" TEXT="(hb-append [d] pict ...)"/>
<node CREATED="1361890164838" ID="ID_1521430503" MODIFIED="1361890230033" TEXT="(htl-append [d] pict ...)"/>
<node CREATED="1361890178102" ID="ID_717301809" MODIFIED="1361890233370" TEXT="(hbl-append [d] pict ...)"/>
</node>
<node CREATED="1361890125464" ID="ID_1489570247" MODIFIED="1383986975351" TEXT="vertical">
<node CREATED="1361890139177" ID="ID_1720184254" MODIFIED="1361890263847" TEXT="(vl-append [d] pict ...)"/>
<node CREATED="1361890164838" ID="ID_128891391" MODIFIED="1361890269086" TEXT="(vc-append [d] pict ...)"/>
<node CREATED="1361890178102" ID="ID_906204845" MODIFIED="1361890276838" TEXT="(vr-append [d] pict ...)"/>
</node>
<node CREATED="1361890844284" ID="ID_631399108" MODIFIED="1361892194160" TEXT="define">
<node CREATED="1361890376151" ID="ID_1788661637" MODIFIED="1361892218298" TEXT="(define id expr)"/>
<node CREATED="1361890822749" ID="ID_1987202732" MODIFIED="1361892253950" TEXT="(define (head args) body...+)"/>
</node>
</node>
</node>
<node CREATED="1359825787601" ID="ID_1133896358" MODIFIED="1458224067209" POSITION="right" TEXT="Syntax and semantics">
<font NAME="Dialog" SIZE="12"/>
<node CREATED="1359825798054" FOLDED="true" ID="ID_541599215" MODIFIED="1428854249689" TEXT="S-expression">
<node CREATED="1359864697292" ID="ID_552874396" MODIFIED="1359864700762" TEXT="Symbolic expressions ">
<node CREATED="1359825906527" ID="ID_1026048602" MODIFIED="1383989415301" TEXT=""sexpr"">
<node CREATED="1359825953083" ID="ID_317555771" MODIFIED="1359825955405" TEXT="M-expressions">
<node CREATED="1359825965938" ID="ID_1299636701" MODIFIED="1359825968565" TEXT="Meta Expressions">
<node CREATED="1359825976553" ID="ID_963846836" MODIFIED="1359825977625" TEXT="which express functions of S-expressions. M-expressions never found favor, and almost all Lisps today use S-expressions to manipulate both code and data."/>
</node>
</node>
</node>
<node CREATED="1359906429664" ID="ID_213813828" MODIFIED="1359906431023" TEXT="mirror the internal representation of code and data"/>
</node>
<node CREATED="1359825826870" ID="ID_1180772220" MODIFIED="1359825828005" TEXT="expression-oriented language">
<node CREATED="1359825840340" ID="ID_462685505" MODIFIED="1359825841743" TEXT="no distinction is made between"expressions" and "statements";"/>
</node>
<node CREATED="1359825865293" ID="ID_1554883980" MODIFIED="1359825866292" TEXT="all code and data are written as expressions"/>
<node CREATED="1359864825843" ID="ID_509268614" MODIFIED="1388795271570" TEXT="fully parenthesized Polish prefix notation">
<node CREATED="1359826024515" ID="ID_1193148511" MODIFIED="1359864885784" TEXT="Lost In Stupid Parentheses">
<node CREATED="1359864918156" ID="ID_134842133" MODIFIED="1359864925825" TEXT="lisp nickname"/>
</node>
<node CREATED="1359826045026" ID="ID_513906655" MODIFIED="1359826046091" TEXT="Lots of Irritating Superfluous Parentheses">
<node CREATED="1359864927466" ID="ID_1512962281" MODIFIED="1359864932789" TEXT="lisp nickname"/>
</node>
</node>
<node CREATED="1359827613191" ID="ID_399141184" MODIFIED="1421215033893" TEXT="S-expressions represent lists">
<node CREATED="1359827624214" ID="ID_1949497729" MODIFIED="1359827625313" TEXT="Parenthesized S-expressions represent linked list structures."/>
<node CREATED="1359827735521" ID="ID_274604832" MODIFIED="1359827736583" TEXT="(a . (b . (c . (d . nil))))">
<node CREATED="1359827737878" ID="ID_1121079480" MODIFIED="1359827744196" TEXT="list notation">
<node CREATED="1359827745175" ID="ID_1012987804" MODIFIED="1359827750990" TEXT="(a b c d)"/>
</node>
</node>
</node>
</node>
<node CREATED="1359827064824" FOLDED="true" ID="ID_100004440" MODIFIED="1458224066215" TEXT="Atom">
<node CREATED="1359827085108" ID="ID_1462879871" MODIFIED="1359827086345" TEXT="number"/>
<node CREATED="1359827086885" ID="ID_1493224519" MODIFIED="1388795790618" TEXT="symbol">
<node CREATED="1359886715616" ID="ID_914985043" MODIFIED="1359886720613" TEXT="unquoted">
<node CREATED="1359827113050" ID="ID_1107868525" MODIFIED="1425749778653" TEXT="variable unique named item">
<node CREATED="1359827115076" ID="ID_1836748255" MODIFIED="1359827121322" TEXT="alnum string"/>
</node>
</node>
<node CREATED="1359873427088" ID="ID_165353477" MODIFIED="1425749776189" TEXT="quoted">
<node CREATED="1359886727466" ID="ID_960241935" MODIFIED="1359886729697" TEXT="string"/>
<node CREATED="1359886753287" ID="ID_1868800715" MODIFIED="1426770920608" TEXT="quote '">
<node CREATED="1359886809040" ID="ID_263817086" MODIFIED="1359886809040">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<font color="rgb(102, 204, 102)" size="15.428571701049805px" face="monospace"><span style="background-color: rgb(255, 255, 255); text-transform: none; font-variant: normal; text-align: start; color: rgb(102, 204, 102); white-space: normal; letter-spacing: normal; line-height: normal; word-spacing: 0px; font-size: 15.428571701049805px; font-family: monospace; font-style: normal; font-weight: normal; text-indent: 0px">(</span></font><font color="rgb(177, 177, 0)" size="15.428571701049805px" face="monospace"><span style="background-color: rgb(255, 255, 255); text-transform: none; font-variant: normal; text-align: start; color: rgb(177, 177, 0); white-space: normal; line-height: normal; letter-spacing: normal; font-size: 15.428571701049805px; word-spacing: 0px; font-family: monospace; font-style: normal; font-weight: normal; text-indent: 0px">quote</span></font><font color="rgb(0, 0, 0)" size="15.428571701049805px" face="monospace"><span style="background-color: rgb(255, 255, 255); text-transform: none; font-variant: normal; text-align: start; color: rgb(0, 0, 0); white-space: normal; line-height: normal; letter-spacing: normal; font-size: 15.428571701049805px; word-spacing: 0px; font-family: monospace; font-style: normal; font-weight: normal; text-indent: 0px"> </span><span style="background-color: rgb(255, 255, 255); text-transform: none; font-variant: normal; text-align: start; color: rgb(0, 0, 0); float: none; white-space: normal; display: inline !important; line-height: normal; letter-spacing: normal; font-size: 15.428571701049805px; word-spacing: 0px; font-family: monospace; font-style: normal; font-weight: normal; text-indent: 0px">foo</span></font><font color="rgb(102, 204, 102)" size="15.428571701049805px" face="monospace"><span style="background-color: rgb(255, 255, 255); text-transform: none; font-variant: normal; text-align: start; color: rgb(102, 204, 102); white-space: normal; line-height: normal; letter-spacing: normal; font-size: 15.428571701049805px; word-spacing: 0px; font-family: monospace; font-style: normal; font-weight: normal; text-indent: 0px">)</span></font>
</body>
</html></richcontent>
<node CREATED="1359886809040" ID="ID_1649379121" MODIFIED="1359886879349">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
<font color="rgb(102, 204, 102)" face="monospace" size="15.428571701049805px">('</font><font color="rgb(0, 0, 0)" face="monospace" size="15.428571701049805px">foo</font><font color="rgb(102, 204, 102)" face="monospace" size="15.428571701049805px">)</font>
</p>
</body>
</html></richcontent>
</node>
</node>
</node>
</node>
</node>
<node CREATED="1359827152913" ID="ID_886978606" MODIFIED="1359827154026" TEXT="immutable and unique"/>
</node>
<node CREATED="1359827266708" ID="ID_335595156" MODIFIED="1458224067268" TEXT="Cons and List">
<node CREATED="1359887386062" ID="ID_1256793233" MODIFIED="1388795330902" TEXT="Cons">
<node CREATED="1359827316514" ID="ID_1242409360" MODIFIED="1359887409391" TEXT="Each cell of this list is called a cons (in Scheme, a pair)"/>
<node CREATED="1359827334887" ID="ID_1576063831" MODIFIED="1359887409389" TEXT="is composed of two pointers, called the car and cdr.">
<node CREATED="1359887433312" ID="ID_1707460061" MODIFIED="1359887449769" TEXT=""car"">
<node CREATED="1359887436208" ID="ID_1822074124" MODIFIED="1359887437498" TEXT="data"/>
</node>
<node CREATED="1359887438468" ID="ID_1424955917" MODIFIED="1359887459395" TEXT=""cdr"">
<node CREATED="1359887441327" ID="ID_1288226298" MODIFIED="1359887442870" TEXT="next"/>
</node>
</node>
</node>
<node CREATED="1359826192556" ID="ID_918915788" MODIFIED="1425749983623" TEXT="List">
<node CREATED="1359826210858" FOLDED="true" ID="ID_336522364" MODIFIED="1388796201002" TEXT="A Lisp list is written with its elements separated by whitespace, and surrounded by parentheses.">
<node CREATED="1359826223677" ID="ID_837733631" MODIFIED="1359826224823" TEXT="For example">
<node CREATED="1359826243094" ID="ID_41625189" MODIFIED="1359826244186" TEXT="(1 2 foo) is a list whose elements are three atoms: the values 1, 2, and foo."/>
</node>
</node>
<node CREATED="1359827297896" ID="ID_1795787919" MODIFIED="1359887846309" TEXT="A Lisp list is a singly linked list."/>
<node CREATED="1359826298294" ID="ID_1374083571" MODIFIED="1388796243619" TEXT="nil">
<node CREATED="1359826280685" ID="ID_1515717411" MODIFIED="1359886964762" TEXT="()">
<node CREATED="1359886965921" ID="ID_203790182" MODIFIED="1359886980770" TEXT="empty list"/>
<node CREATED="1359826293173" ID="ID_252112926" MODIFIED="1359887194918" TEXT="special atom ">
<node CREATED="1359826317544" ID="ID_211278879" MODIFIED="1359826319567" TEXT="This is the only entity in Lisp which is both an atom and a list"/>
</node>
</node>
</node>
<node CREATED="1359826396879" ID="ID_548378945" MODIFIED="1359887243829" TEXT="Expressions are written as lists">
<node CREATED="1359826406485" ID="ID_1689707887" MODIFIED="1359887298569" TEXT="using prefix notation">
<node CREATED="1359826410060" ID="ID_575978686" MODIFIED="1359887293933" TEXT="first element">
<node CREATED="1359826424518" ID="ID_1613183811" MODIFIED="1359826427398" TEXT="form">
<node CREATED="1359826428552" ID="ID_1466599602" MODIFIED="1359826439201" TEXT="function"/>
<node CREATED="1359826439770" ID="ID_816971379" MODIFIED="1359826442060" TEXT="operator"/>
<node CREATED="1359826442304" ID="ID_1044650715" MODIFIED="1359826445504" TEXT="macro"/>
<node CREATED="1359826445742" ID="ID_910927302" MODIFIED="1359826451711" TEXT="special operator"/>
</node>
</node>
<node CREATED="1359826453329" ID="ID_407780201" MODIFIED="1359887291596" TEXT="remainder">
<node CREATED="1359826480051" ID="ID_1932708108" MODIFIED="1359826481285" TEXT="arguments"/>
</node>
</node>
</node>
<node CREATED="1359827779871" ID="ID_1733237475" MODIFIED="1425794485938" TEXT="List-processing procedures">
<node CREATED="1359827782081" ID="ID_641814061" MODIFIED="1388795740898" TEXT=""list"">
<node CREATED="1359827801725" ID="ID_1662777105" MODIFIED="1359827805240" TEXT="return a list">
<node CREATED="1359827828641" ID="ID_660340834" MODIFIED="1359827829880" TEXT="(list 1 2 'a 3)"/>
</node>
</node>
<node CREATED="1359898829477" FOLDED="true" ID="ID_324163621" MODIFIED="1426770965182" TEXT=""setf" (clisp)">
<node CREATED="1359899270715" ID="ID_379836652" MODIFIED="1388796267790" TEXT="define variable">
<node CREATED="1359899031568" ID="ID_1265409530" MODIFIED="1359899221368">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
[1]> (setf foo '(1 2 3))
</p>
<p>
(1 2 3)
</p>
<p>
[2]> (setf bar '(a b c))
</p>
<p>
(A B C)
</p>
<p>
[3]> foo
</p>
<p>
(1 2 3)
</p>
<p>
[4]> bar
</p>
<p>
(A B C)
</p>
<p>
[5]>(clisp)
</p>
</body>
</html></richcontent>
</node>
</node>
</node>
<node CREATED="1359898865519" FOLDED="true" ID="ID_1702127685" MODIFIED="1426770968859" TEXT=""define" (scheme)">
<node CREATED="1359899285897" ID="ID_1579102505" MODIFIED="1388796357921" TEXT="define variable">
<node CREATED="1359899068299" ID="ID_1602109932" MODIFIED="1359899234170">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
> (define foo '(a b c))
</p>
<p>
> (define bar '(1 2 3))
</p>
<p>
> foo
</p>
<p>
'(a b c)
</p>
<p>
> bar
</p>
<p>
'(1 2 3)
</p>
<p>
>(scheme)
</p>
</body>
</html></richcontent>
</node>
</node>
</node>
<node CREATED="1359897966528" ID="ID_1591417034" MODIFIED="1388796414657" TEXT=""car"">
<node CREATED="1359823694627" ID="ID_380648291" MODIFIED="1359858213147" TEXT="return the first item in a list."/>
</node>
<node CREATED="1359897967605" ID="ID_1920546907" MODIFIED="1388796416077" TEXT=""cdr"">
<node CREATED="1359823721223" ID="ID_679868650" MODIFIED="1359858210580" TEXT="return the rest of the list."/>
</node>
<node CREATED="1359827907955" ID="ID_801333050" MODIFIED="1388796417224" TEXT=""cons"">
<node CREATED="1359827904419" ID="ID_190115930" MODIFIED="1359827941061" TEXT="add an element to the front of a list">
<node CREATED="1359827943251" HGAP="16" ID="ID_225950020" MODIFIED="1359896983858" VSHIFT="-39">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<pre style="margin-left: 0px; vertical-align: top; background-color: rgb(249, 249, 249); text-transform: none; margin-bottom: 0px; word-spacing: 0px; background-image: none; margin-right: 0px; padding-right: 0px; border: 0px none white; padding-bottom: 0px; padding-left: 0px; font-variant: normal; padding-top: 0px; text-indent: 0px; line-height: 1.2em; font-style: normal; margin-top: 0px; font-size: 1em; font-weight: normal; text-align: start; color: black; font-family: monospace; letter-spacing: normal"><font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font><font color="rgb(177, 177, 0)"><span style="color: rgb(177, 177, 0)">cons</span></font> <font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">1</span></font> '<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font><font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">2</span></font> <font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">3</span></font><font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">)</span><span style="color: rgb(102, 204, 102)">)</span></font>
<font color="rgb(128, 128, 128)"><span style="font-style: italic; color: rgb(128, 128, 128)"><i>;Output: (1 2 3)</i></span></font></pre>
</body>
</html></richcontent>
</node>
<node CREATED="1359827952354" HGAP="13" ID="ID_738287215" MODIFIED="1359896977973" VSHIFT="15">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<pre style="margin-left: 0px; vertical-align: top; background-color: rgb(249, 249, 249); text-transform: none; margin-bottom: 0px; word-spacing: 0px; background-image: none; margin-right: 0px; padding-right: 0px; border: 0px none white; padding-bottom: 0px; padding-left: 0px; font-variant: normal; padding-top: 0px; text-indent: 0px; line-height: 1.2em; font-style: normal; margin-top: 0px; font-size: 1em; font-weight: normal; text-align: start; color: black; font-family: monospace; letter-spacing: normal"><font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font><font color="rgb(177, 177, 0)"><span style="color: rgb(177, 177, 0)">cons</span></font> '<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font><font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">1</span></font> <font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">2</span></font><font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">)</span></font> '<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font><font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">3</span></font> <font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">4</span></font><font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">)</span><span style="color: rgb(102, 204, 102)">)</span></font>
<font color="rgb(128, 128, 128)"><span style="font-style: italic; color: rgb(128, 128, 128)"><i>;Output: ((1 2) 3 4)</i></span></font></pre>
</body>
</html></richcontent>
</node>
</node>
</node>
<node CREATED="1359827994727" ID="ID_1221094226" MODIFIED="1388795835918" TEXT=""append"">
<node CREATED="1359828012100" ID="ID_1443633201" MODIFIED="1359828047756" TEXT="appends two (or more) lists to one another.">
<node CREATED="1359828046844" HGAP="17" ID="ID_1966791989" MODIFIED="1359896994219" VSHIFT="-31">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<pre style="margin-left: 0px; vertical-align: top; background-color: rgb(249, 249, 249); text-transform: none; margin-bottom: 0px; word-spacing: 0px; background-image: none; margin-right: 0px; padding-right: 0px; border: 0px none white; padding-bottom: 0px; padding-left: 0px; font-variant: normal; padding-top: 0px; text-indent: 0px; line-height: 1.2em; font-style: normal; margin-top: 0px; font-size: 1em; font-weight: normal; text-align: start; color: black; font-family: monospace; letter-spacing: normal"><span style="color: rgb(102, 204, 102)"><font color="rgb(102, 204, 102)">(</font></span><font color="rgb(177, 177, 0)"><span style="color: rgb(177, 177, 0)">append</span></font> '<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font><font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">1</span></font> <font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">2</span></font><font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">)</span></font> '<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font><font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">3</span></font> <font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">4</span></font><font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">)</span><span style="color: rgb(102, 204, 102)">)</span></font>
<font color="rgb(128, 128, 128)"><span style="font-style: italic; color: rgb(128, 128, 128)"><i>;Output: (1 2 3 4)</i></span></font></pre>
</body>
</html></richcontent>
</node>
<node CREATED="1359828038342" HGAP="17" ID="ID_1895265934" MODIFIED="1359896989217" VSHIFT="-2">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<pre style="margin-left: 0px; vertical-align: top; background-color: rgb(249, 249, 249); text-transform: none; margin-bottom: 0px; word-spacing: 0px; background-image: none; margin-right: 0px; padding-right: 0px; border: 0px none white; padding-bottom: 0px; padding-left: 0px; font-variant: normal; padding-top: 0px; text-indent: 0px; line-height: 1.2em; font-style: normal; margin-top: 0px; font-size: 1em; font-weight: normal; text-align: start; color: black; font-family: monospace; letter-spacing: normal"><span style="color: rgb(102, 204, 102)"><font color="rgb(102, 204, 102)">(</font></span><font color="rgb(177, 177, 0)"><span style="color: rgb(177, 177, 0)">append</span></font> '<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font><font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">1</span></font> <font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">2</span></font> <font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">3</span></font><font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">)</span></font> '<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span><span style="color: rgb(102, 204, 102)">)</span></font> '<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font>a<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">)</span></font> '<font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">(</span></font><font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">5</span></font> <font color="rgb(204, 102, 204)"><span style="color: rgb(204, 102, 204)">6</span></font><font color="rgb(102, 204, 102)"><span style="color: rgb(102, 204, 102)">)</span><span style="color: rgb(102, 204, 102)">)</span></font>
<font color="rgb(128, 128, 128)"><span style="font-style: italic; color: rgb(128, 128, 128)"><i>;Output: (1 2 3 a 5 6)</i></span></font></pre>
</body>
</html></richcontent>
</node>
</node>
</node>
<node CREATED="1359897005640" ID="ID_1647408092" MODIFIED="1359903331408" TEXT=""quote" (')">
<node CREATED="1359897034179" ID="ID_399564644" MODIFIED="1359897317590" TEXT="prevents the quoted arguments from being evaluated, literal constant."/>
</node>
<node CREATED="1359897043601" FOLDED="true" ID="ID_223149328" MODIFIED="1426770978439" TEXT=""quasiquote" (`)">
<node CREATED="1359897350828" ID="ID_1675101217" MODIFIED="1359897712753" TEXT="similar to quote, except for comma and comma-at interpolations."/>
<node CREATED="1359897714905" ID="ID_149269192" MODIFIED="1388796514897" TEXT="comma(,) interpolations (list fold)">
<node CREATED="1359897939855" ID="ID_1732669666" MODIFIED="1359898651208">