Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ex3
--ghc 8.0.1 /opt/ghc/8.0.1/lib/ghc-8.0.0.20160127/ main = print $ "Hello, world!" data Digit = Zero | One | Two deriving (Eq,Enum,Show) type Digits = [Digit] data Sign = Pos | Neg deriving (Eq,Show) newtype Numeral = Num (Sign,Digits) deriving (Eq,Show) canonize :: Numeral -> Numeral canonize n = n int2num :: Integer -> Numeral int2num n = Num(Pos, []) num2int :: Numeral -> Integer num2int n = 1
run
|
edit
|
history
|
help
0
New wall
(Int,Int) -> Bool plot
project euler 6, haskell
Derive type class for parameterized data type
equiv_strings
sumer
Factors of a number, prime numbers
first haskell program
project euler 9, haskell
Lambda Parser with long ids