Tap, Tap, Tap

The update method normally returns a boolean; however, since we used the tap function, the update method will return the User model we tapped..This feature of tap makes it easy to force any method on an object to return the object itself.While tap is a very simple helper, I find it often lets me write terse, one-line operations that would normally require temporary variables or additional lines..Let me know if you find any other interesting uses of tap!. More details

Leave a Reply