Skip to content

Instantly share code, notes, and snippets.

@Emersont1
Created May 30, 2021 15:08
Show Gist options
  • Save Emersont1/203d4ccfc47eca3cc07fcac59792d11e to your computer and use it in GitHub Desktop.
Save Emersont1/203d4ccfc47eca3cc07fcac59792d11e to your computer and use it in GitHub Desktop.
-- Daft Punk
wmdm = ["work it ","make it ","do it ","makes us "]
hbfs = ["harder","better","faster","stronger"]
mteha = [("more than ", "ever"), ("hour ", "after")]
hwino = [("hour ", "work is"), ("never ", "over")]
intro = wmdm ++ hbfs ++ map fst (mteha ++ hwino) ++ map snd (mteha ++ hwino) ++ wmdm ++ hbfs
chorus = zipWith (++) wmdm hbfs ++ fmap combine (mteha ++ hwino)
chorusalt = zipWith (++) wmdm ("":tail hbfs) ++ fmap combine (mteha ++ hwino)
outro = evens (zipWith (++) wmdm hbfs) ++ fmap combine (head mteha:hwino)
song = intro ++ take 7 chorus ++ chorusalt ++ take 4 chorus ++ outro++chorus
evens (x:xs) = x:odds xs
evens _ = []
odds (_:xs) = evens xs
odds _ = []
combine (x, y) = x++y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment