Apex utility class inspired by Underscore.js