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
project euler 9, haskell
Knight Journey
haskell_exam_demo
State
=)
Lambda Parser with long ids
credit card number validator
Haskell Tree example
project euler 2, haskell
Pascal's triangle in 10 lines