blob: c6595dee11dbbc9ed6d30bfdcd1c6fc43c96ded4 (
plain)
1
2
3
4
5
6
7
8
9
|
-- Consider three two-dimensional points a, b, and c. If we look at the angle
-- formed by the line segment from a to b and the line segment from b to c, it
-- either turns left, turns right, or forms a straight line. Define a Direction
-- data type that lets you represent these possibilities.
data Direction = DLeft
| DRight
| DStraight
deriving (Show)
|