her.esy.fun/src/posts/0010-Haskell-Now/type_constr_1.hs

12 lines
267 B
Haskell
Raw Normal View History

2019-12-25 15:35:56 +00:00
type Name = String
type Color = String
showInfos :: Name -> Color -> String
showInfos name color = "Name: " ++ name
++ ", Color: " ++ color
name :: Name
name = "Robin"
color :: Color
color = "Blue"
main = putStrLn $ showInfos name color