small sync

This commit is contained in:
Geir Okkenhaug Jerstad 2024-09-02 08:58:30 +02:00
parent c43a63cc2e
commit 89c1d3be54
4 changed files with 20 additions and 0 deletions

14
MIT/sqrt.scm Normal file
View file

@ -0,0 +1,14 @@
(define (sqrt x)
(define tolerance 0.00001)
(define (good-enough? y)
(< (abs (- (* y y) x)) tolerance))
(define (improve y)
(average (/ x y) y))
(define (try y)
(if (good-enough? y)
y
(try (improve y))))
(try 1))
(sqrt 13)

1
Structure/test.scm Normal file
View file

@ -0,0 +1 @@
(define add2(+ 2))

5
fixum/hello.scm Normal file
View file

@ -0,0 +1,5 @@
; The first program
(begin
(display "Hello, World!")
(newline))

Binary file not shown.