nikic / iter

Iteration primitives using generators
Other
1.12k stars 76 forks source link

Add ** operator #22

Closed yuya-takeyama closed 10 years ago

yuya-takeyama commented 10 years ago

It's useful like this.

iter\toArray(iter\map(iter\fn\operator('**', 2), iter\range(1, 10)));
// => [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
nikic commented 10 years ago

Thanks!