Added extend(), map(), and reduce() functions.