RosettaCodeData/Task/Rep-string/EchoLisp/rep-string-2.echolisp

21 lines
482 B
Plaintext

(define strings '["1001110011" "1110111011" "0010010010" "1010101010"
"1111111111" "0100101101" "0100100" "101" "11" "00" "1"])
(define (task strings)
(for-each (lambda (s)
(writeln s (cyclic? (string->list s)))) strings))
(task strings)
"1001110011" "10011"
"1110111011" "1110"
"0010010010" "001"
"1010101010" "1010"
"1111111111" "11111"
"0100101101" no-rep
"0100100" "010"
"101" no-rep
"11" "1"
"00" "0"
"1" too-short-no-rep