diff --git a/zapiski/1_g1smo.html b/zapiski/1_g1smo.html index 8d8dca2..0b9c6da 100644 --- a/zapiski/1_g1smo.html +++ b/zapiski/1_g1smo.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Zapiski #1 srečanja programerskega bralnega krožka SICP @@ -198,13 +198,13 @@

Zapiski #1 srečanja programerskega bralnega krožka SICP

-
-

Zanimivi izseki

-
+
+

Zanimivi izseki

+
-
-

str. 9

-
+
+

str. 9

+

Every reader should ask himself periodically "Toward what end, toward what end?" — but do not ask it too often lest you pass up the fun of programming for the constipation of bittersweet philosophy. @@ -218,9 +218,9 @@ Lisp is a survivor, having been in use for about a quarter of a century.

-
-

str. 11

-
+
+

str. 11

+

It is better to have 100 functions operate on one data structure than to have 10 functions operate on 10 data structures. @@ -228,9 +228,9 @@ It is better to have 100 functions operate on one data structure than to have 10

-
-

str. 18

-
+
+

str. 18

+

Thus, programs must be written for people to read, and only incidentally for machines to execute. @@ -238,9 +238,9 @@ Thus, programs must be written for people to read, and only incidentally for mac

-
-

str. 19

-
+
+

str. 19

+

Underlying our approach to this subject is our conviction that "computer science" is not a science and that its significance has little to do with computers. @@ -248,9 +248,9 @@ Underlying our approach to this subject is our conviction that "computer science

-
-

str. 27

-
+
+

str. 27

+

Finally, we would like to acknowledge the support of the organizations that have encouraged this work over the years, including support from Hewlett-Packard, made possible by Ira Goldstein and Joel Birnbaum, and support from DARPA, made possible by Bob Kahn. @@ -271,25 +271,25 @@ Preko očeta v sorodu s fizikom Hermanom Kahnom, ki je napisal knjigo o tem kako

-
-

str. 77

-
+
+

str. 77

+

Stoy 1977

-
-

Vaje

-
+
+

Vaje

+
-
-

1.1 Kaj vrnejo izrazi?

+
+

1.1 Kaj vrnejo izrazi?

-
-

1.2 Pretvori izraz v prefix obliko

-
+
+

1.2 Pretvori izraz v prefix obliko

+
(/ (+ 5 4
       (- 2
@@ -307,9 +307,9 @@ Stoy 1977
 
-
-

1.3 procedura, ki prejme 3 argumente in vrne vsoto kvadratov vecjih dveh

-
+
+

1.3 procedura, ki prejme 3 argumente in vrne vsoto kvadratov vecjih dveh

+
(define (vsota-vecjih-kvadratov a b c)
   (cond ((<= a b c) (+ (* b b) (* c c)))
@@ -327,44 +327,74 @@ Stoy 1977
           (+kvadrat a b)
           (+kvadrat b c))))
 
-(display "Pricakovano\n")
-(display '(85 41 164 89))
+(list
+  '("Pricakovano" 85 41 164 89)
 
-(display "\nFunkcija1\n")
-(display
-  (list (vsota-vecjih-kvadratov 6 1 7)
-        (vsota-vecjih-kvadratov 3 4 5)
-        (vsota-vecjih-kvadratov 8 10 2)
-        (vsota-vecjih-kvadratov 3 8 5)))
+  (list "Funkcija1"
+    (vsota-vecjih-kvadratov 6 1 7)
+    (vsota-vecjih-kvadratov 3 4 5)
+    (vsota-vecjih-kvadratov 8 10 2)
+    (vsota-vecjih-kvadratov 3 8 5))
 
-(display "\nFunkcija2\n")
-(display
-  (list (vsota-vecjih-kvadratov2 6 1 7)
-        (vsota-vecjih-kvadratov2 3 4 5)
-        (vsota-vecjih-kvadratov2 8 10 2)
-        (vsota-vecjih-kvadratov2 3 8 5)))
+  (list "Funkcija2"
+    (vsota-vecjih-kvadratov2 6 1 7)
+    (vsota-vecjih-kvadratov2 3 4 5)
+    (vsota-vecjih-kvadratov2 8 10 2)
+    (vsota-vecjih-kvadratov2 3 8 5)))
 
-
-Pricakovano
-(85 41 164 89)
-Funkcija1
-(85 41 164 73)
-Funkcija2
-(85 41 164 89)
-
+ + + +++ ++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + +
Pricakovano854116489
Funkcija1854116473
Funkcija2854116489
-
-

1.4

+
+

1.4

Author: Jurij

-

Created: 2024-04-21 ned 17:31

+

Created: 2024-04-21 ned 17:35

Validate

diff --git a/zapiski/1_g1smo.org b/zapiski/1_g1smo.org index ae3bd89..0e24799 100644 --- a/zapiski/1_g1smo.org +++ b/zapiski/1_g1smo.org @@ -54,7 +54,7 @@ Stoy 1977 : -43/180 ** 1.3 procedura, ki prejme 3 argumente in vrne vsoto kvadratov vecjih dveh -#+begin_src scheme :exports both :results output +#+begin_src scheme :exports both :results table (define (vsota-vecjih-kvadratov a b c) (cond ((<= a b c) (+ (* b b) (* c c))) ((<= b a c) (+ (* a a) (* c c))) @@ -71,30 +71,25 @@ Stoy 1977 (+kvadrat a b) (+kvadrat b c)))) - (display "Pricakovano\n") - (display '(85 41 164 89)) - - (display "\nFunkcija1\n") - (display - (list (vsota-vecjih-kvadratov 6 1 7) - (vsota-vecjih-kvadratov 3 4 5) - (vsota-vecjih-kvadratov 8 10 2) - (vsota-vecjih-kvadratov 3 8 5))) + (list + '("Pricakovano" 85 41 164 89) - (display "\nFunkcija2\n") - (display - (list (vsota-vecjih-kvadratov2 6 1 7) - (vsota-vecjih-kvadratov2 3 4 5) - (vsota-vecjih-kvadratov2 8 10 2) - (vsota-vecjih-kvadratov2 3 8 5))) + (list "Funkcija1" + (vsota-vecjih-kvadratov 6 1 7) + (vsota-vecjih-kvadratov 3 4 5) + (vsota-vecjih-kvadratov 8 10 2) + (vsota-vecjih-kvadratov 3 8 5)) + + (list "Funkcija2" + (vsota-vecjih-kvadratov2 6 1 7) + (vsota-vecjih-kvadratov2 3 4 5) + (vsota-vecjih-kvadratov2 8 10 2) + (vsota-vecjih-kvadratov2 3 8 5))) #+end_src #+RESULTS: -: Pricakovano -: (85 41 164 89) -: Funkcija1 -: (85 41 164 73) -: Funkcija2 -: (85 41 164 89) +| Pricakovano | 85 | 41 | 164 | 89 | +| Funkcija1 | 85 | 41 | 164 | 73 | +| Funkcija2 | 85 | 41 | 164 | 89 | ** 1.4