replaces uses of map with fmap (<$>)
slightly more idiomatic style