1
0
mirror of https://github.com/osmarks/random-stuff synced 2025-09-11 23:06:00 +00:00

reorganize, upload some things

This commit is contained in:
2021-03-21 19:36:03 +00:00
parent 46068fabcb
commit 0ecadee189
18 changed files with 553 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
(define count-zeros
(lambda (x) (if (= (random 50) 48) (count-zeros (+ 1 x)) x)))
(define try-sequentially (lambda (x max)
(random-seed x)
(let ((zeros (count-zeros 0))) (if (> zeros max)
(begin
(display "s=")
(display x)
(display ", r=")
(display zeros)
(newline)
(try-sequentially (+ 1 x) zeros))
(try-sequentially (+ 1 x) max)))))
(try-sequentially 1 0)
(exit)