Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
#lang racket
|
||||
(let loop ([nums (range 1 10)] [n 0])
|
||||
(cond [(apply < nums) (if (zero? n)
|
||||
(loop (shuffle nums) 0)
|
||||
(printf "Done in ~s steps.\n" n))]
|
||||
[else (printf "Step #~s: ~s\nFlip how many? " n nums)
|
||||
(define-values (l r) (split-at nums (read)))
|
||||
(loop (append (reverse l) r) (add1 n))]))
|
||||
Loading…
Add table
Add a link
Reference in a new issue