You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
409 B

{-|
Module: Misc
Description: Contains miscellaneous definitions used throughout the program
Contains miscellaneous definitions used throughout the program
-}
module Misc where
-- | Traverse infix operator becuase I hate you.
infixl 6 <~>
(<~>) :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
(<~>) = traverse
10 months ago
-- | Swap the two elements of a pair
swap :: (a,b) -> (b,a)
swap (a,b) = (b,a)