Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

MY OTHER ______

Name: Anonymous 2007-11-02 19:53


My other ______ is a ______!
          noun        noun

Name: Anonymous 2007-11-04 8:30


myOther :: String -> String
myOther x = "My other " ++ x ++ " is a " ++ makeOther x

makeOther :: String -> String
makeOther = flip makeOther' True

makeOther' :: String -> Bool -> String
makeOther' ('a':xs) True   = 'd' : (makeOther' xs False)
makeOther' (x  :xs) b      = x   : (makeOther' xs b)
makeOther' []       True   = "...uhh, I don't actually understand the joke"
makeOther' []       False  = []

main :: IO ()
main = getLine >>= (print . myOther)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List