Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -12,14 +12,14 @@
;; use "|" as letters separator
(define (string->morse str morse)
(apply append (map string->list
(for/list [(a (string-diacritics str))]
(string-append
(or (hash-ref morse (string-upcase a)) "?") "|")))))
(for/list [(a (string-diacritics str))]
(string-append
(or (hash-ref morse (string-upcase a)) "?") "|")))))
(define (play-morse)
(when EMIT ;; else return #f which stops (at-every)
(case (first EMIT)
((".") (play-sound 'digit) (write "dot"))
(("-") (play-sound 'tick) (write "dash"))
(else (writeln) (blink)))
(set! EMIT (rest EMIT))))
(when EMIT ;; else return #f which stops (at-every)
(case (first EMIT)
((".") (play-sound 'digit) (write "dot"))
(("-") (play-sound 'tick) (write "dash"))
(else (writeln) (blink)))
(set! EMIT (rest EMIT))))