fork download
  1. #!/usr/bin/env racket
  2.  
  3. #lang racket
  4.  
  5. (require(only-in srfi/13 string-tokenize)
  6. (only-in srfi/14 char-set-difference
  7. char-set:graphic
  8. char-set:punctuation))
  9.  
  10. (let ((n 3)
  11. (row (string-tokenize
  12. (begin (printf "a, b, cの入力 : ~%") (read-line))
  13. (char-set-difference
  14. char-set:graphic
  15. char-set:punctuation))))
  16. (when (= (length row) n)
  17. (let ((row (append row row)))
  18. (for-each (lambda (x)
  19. (apply printf "~a ~a ~a~%"
  20. (map (lambda (y)
  21. (list-ref row (+ x y)))
  22. (range n))))
  23. (range n)))))
  24.  
Success #stdin #stdout 0.6s 75100KB
stdin
1, 2, 3
stdout
Standard output is empty