Last active
October 20, 2015 19:57
-
-
Save adregan/439dc585f8f4e5fa68c8 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
#lang racket | |
; get-pieces : List Number String -> String | |
; will return a string of a given length(50) pieces shuffled repeating | |
; all the pieces within every x number of pieces | |
(define (get-pieces [pieces (list #\O #\I #\S #\Z #\L #\J #\T)] [length 50] [output ""]) | |
(if (>= (string-length output) length) | |
(substring output 0 length) | |
(get-pieces pieces length (string-append (list->string (shuffle pieces)) output)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment