Skip to content

anonymous /gist:5751902
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Oppression Olympics in Haskell
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.