module Utils (on, dot, dbgPrint, andReturn) where

import Control.Monad
import System.IO

infixl 1 `on`
on (*) f x y = f x * f y

-- also known as the (.).(.) or boobs operator
dot g f x y = g (f x y)

dbgPrint x = hPrint stderr x
andReturn m = liftM2 (>>) m return

