Skip to content

Instantly share code, notes, and snippets.

@SamuelMarks SamuelMarks/Main.hs
Created Nov 20, 2014

Embed
What would you like to do?
module Main where
import Test
import Data.Typeable
main :: IO ()
main = do
putStrLn $ show $ double 2
putStrLn $ show $ quadruple 2
putStrLn $ show $ factorial 10
putStrLn "Welcome to FP"
putStrLn $ "typeOf [\"foo\"] = " ++ show (typeOf ["foo"])
module Test where
double x = x + x
quadruple x = double (double x)
factorial n = product [1..n]
average ns = sum ns `div` length ns
somefun = a `div` length xs
where
a = 10
xs = [1..5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.