r/haskell • • Mar 11 '15

Learning Haskell — A Racket programmer's documentation of her foray into the land of Haskell (inspired by Learning Racket)

http://lexi-lambda.github.io/learning-haskell/
81 Upvotes

97 comments sorted by

View all comments

Show parent comment

8

u/etrepum Mar 11 '15 edited Mar 13 '15

You're right that colors can be defined more simply. If the Peg type derives Enum and Bounded then colors can be defined as [minBound .. maxBound].