Last active
July 8, 2017 01:40
-
-
Save hchbaw/5106be739c86348a869ccfafc31a5b21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; https://teratail.com/questions/83177 | |
(use srfi-14 :only (char-set->list)) | |
(define (pr xxs) | |
(define (stringify xxs listref) | |
(string-join (concatenate (map listref xxs)) " ")) | |
(begin | |
($ print $ stringify xxs car) | |
($ print $ stringify xxs (cut list-ref <> 1 '())))) | |
(let () | |
(define xs ($ map string $ sort $ char-set->list #[a-z])) | |
(define (slices~ n xs) (slices xs n)) | |
(for-each pr ($ slices~ 4 $ slices~ 2 $ slices~ 2 xs))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment