Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

13
Task/Menu/Racket/menu.rkt Normal file
View file

@ -0,0 +1,13 @@
#lang racket
(define (menu choices)
(cond [(null? choices) ""]
[else (for ([c choices] [i (in-naturals 1)]) (printf "~a. ~a\n" i c))
(printf "Enter a number: ")
(define n (string->number (read-line)))
(or (and (exact-integer? n)
(<= 1 n (length choices))
(list-ref choices (sub1 n)))
(menu choices))]))
(menu '("fee fie" "huff and puff" "mirror mirror" "tick tock"))