It's been about a year since I used Haskell and I'm rusty. I think I knew how to do this once, but I need a reminder.

I've got some functions:

getDeviceInfo :: Int -> IO DeviceInfo

name :: DeviceInfo -> String

I want to do something like

func :: IO ()
func = do
  ds <- mapM getDeviceInfo [0..10]
  mapM_ (print . name) ds

Is there a way to combine 'getDeviceInfo', 'name', and 'print' in one line?

Dennis