title: What does flatMap do exactly?
body: <p>For a coding assignment for school I have to do stuff with flatmap but I have absolutely no idea what it does and I've read a couple pages online and read in my textbook but I still have no true understanding of what it does. I know what map does but for some reason it's hard for me to wrap my head around flatmap. Can anyone help? Thanks. </p>
  
  <p>Just to add some more information- when I look at examples online I DO see how flatmap returns something different from map. But what is flatmap actually doing when its being called on something? How does flatmap actually work? What is it doing before it returns the result? </p>