The Smarter way to print() using Swift’s Awesome Extension
Awais Ansari
171

I’m not sure if I’m missing something but maybe adding a return self to the extension might allow to add “.po()” call even on parameters being passed to functions

Would you consider this variation?

func po() -> Int

{

print(self)

return self

}

Like what you read? Give Antonio Di Giacomo a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.