On Monday, 16 December 2019 at 15:13:44 UTC, jmh530 wrote:
> [snip]
>
> What I mean is that if i is 0.5, then you have to return a
> complex. So you have to add a special case for that.
Simple work-around for the (-1)^^i:
import std;
void main() {
auto x = iota(10).map!(a => a % 2 ? 1 : -1);
}