JavaScript with Partial Application