RosettaCodeData/Task/Straddling-checkerboard/Racket/straddling-checkerboard-3.rkt
2023-07-01 13:44:08 -04:00

17 lines
662 B
Racket

(define (test-straddling message board)
(let* ([encoded (straddle message board)]
[decoded (unstraddle encoded board)])
(displayln board)
(displayln message)
(displayln encoded)
(displayln decoded)))
(test-straddling "One night-it was on the twentieth of March, 1888-I was returning"
(straddling "HOL MES RT"
"ABCDFGIJKN"
"PQUVWXYZ./"))
(newline)
(test-straddling "One night-it was on the twentieth of March, 1888-I was returning"
(straddling "ET AON RIS"
"BCDFGHJKLM"
"PQ/UVWXYZ."))