Created
April 24, 2014 20:44
-
-
Save Rembane/11268853 to your computer and use it in GitHub Desktop.
Det kan vara så att jag blev lite ivrig efter dagens Perlande...
This file contains hidden or 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 Control.Monad | |
import Data.Char | |
import Data.List | |
color s c = "\x1b[38;5;" ++ show c ++ "m" ++ s ++ "\x1b[0m" | |
txt = map chr $ foldr (\a (b:bs) -> (a+b):(b:bs)) [32] [(-12),2,(-3),7,(-3),7,69] | |
main = sequence_ $ cycle $ map (\c -> putStr $ color txt c) [0..256] | |
{- | |
- Hint: Pejsta det här i skalet om du hamnar på en färg du inte trivs med: | |
echo -e "\e[0m" | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment