Go to the first, previous, next, last section, table of contents.

CompassDirection abstraction

Definition of CompassDirection and some operations over it:


data CompassDirection
 = West 
 | NorthWest
 | North 
 | NorthEast
 | East
 | SouthEast
 | South
 | SouthWest
 | Centre

 -- instances: Eq, Ord, Ix, Text

northOrSouth :: CompassDirection -> Bool
eastOrWest   :: CompassDirection -> Bool

diametricDir :: CompassDirection -> CompassDirection
simplifyDir  :: CompassDirection -> [CompassDirection]


Go to the first, previous, next, last section, table of contents.