More haskell-idiomatic median