Quick actions

cmd+k|ctrl+k

Navigation

Languages

A monad is just a monoid in the category of endofunctors, what's the problem?

Snippet info

Language

Haskell

Visibility

public

Author

rightfold

Created

2016-09-04T19:40:01Z

Updated

2016-09-11T21:16:19Z

import System.Random (randomRIO)

bullshit = [ "A " ++ a ++ " is just a " ++ b ++ " in the " ++ c ++ " of " ++ d ++ "s, what's the problem?"
           | a <- nonsense
           , b <- nonsense
           , c <- nonsense
           , d <- map fixY nonsense
           ]
  where fixY ('y' : "") = "ie"
        fixY (c : cs) = c : fixY cs
        fixY "" = ""

nonsense = [ "category"
           , "functor"
           , "monad"
           , "monoid"
           , "manifold"
           , "group"
           , "magma"
           , "morphism"
           , "natural transformation"
           , "endofunctor"
           , "zygohistomorphic prepromorphism"
           ]

main = randomRIO (0, length bullshit - 1) >>= \n -> putStrLn (bullshit !! n)
INFO