Created
April 8, 2015 17:59
-
-
Save alterakey/e03372f0f37baa1bc944 to your computer and use it in GitHub Desktop.
egg launcher exercise in haskell
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
import qualified Data.Text.Lazy as T | |
import qualified Data.Text.Lazy.IO as I | |
egg x pad y = T.take x $ T.justifyLeft x pad y | |
repetitive_egg x pad y = egg x pad $ T.replicate (1 + (div x $ T.length y)) y | |
main = I.putStrLn . repetitive_egg 20 '\x90' $ T.pack "\x11\x22\x33\x44" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment