Reimplementing underscore functions for fun