Catalan number

Run Settings
LanguageHaskell
Language Version
Run Command
import Control.Applicative import Control.Monad main :: IO () main = print =<< catalan <$> readLn catalan :: Integral a => a -> a catalan n = product [n+1..2*n] `div` product [1..n] `div` (n+1)
Editor Settings
Theme
Key bindings
Full width
Lines