Can you be friends with an ex?

And as we stood in the elevator, it seemed like a romantic comedy. Two people whose last interaction involved screaming and crying were talking. There was no screaming or yelling. It was pleasant and fun. She laid her head on my shoulder. I put my arm around her shoulders and walked her off the elevator. I couldn’t help but wonder, can you really be friends an ex?