Looks somewhat ugly and also slow. (each element is processed in a separate process)
Edit: Geez, I even did a refresh check before clicking submit. I'm having the worst luck with that lately.
Re ugly: well, eye of the beholder I suppose.
def square(float x) float : x*x def main(array<float, 256> a) array<float, 256> : map(square, a)
sub pmap(Code $func, @items) {
return await @items.map: {
start { $func($_) }
}
}