anonymous / gist:5751902
Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Oppression Olympics in Haskell

View gist:5751902
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
module Oppression where
 
tw' :: Int -> String
tw' n = foldl (\x y -> concat ["(tw: ", x, ") ", y]) "rape" (replicate n "rape")
 
tw'' :: Int -> String
tw'' n = foldl (\x y -> concat ["(tw: ", x, ")"]) "rape" (replicate n "rape")
 
tw''' :: [String] -> String
tw''' = foldl (\x y -> concat ["(tw: ", x, ") ", y]) "rape"
 
tw'''' :: [String] -> String
tw'''' rape = concat ["(tw: ", foldl (\x y -> concat ["(tw: ", x, ") ", y]) "rape" rape, ")"]
 
tw :: [String] -> String
tw rape = concat ["(tw: ", oppression, ")"]
where oppression = foldl triggers "rape" rape
triggers x y = concat ["(tw: ", x, ") ", y]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.