Here's a map in my functional language (winter). It's not parallel yet, that shouldn't affect the syntax though. (map is already manifestly parallel)
def square(float x) float : x*x def main(array<float, 256> a) array<float, 256> : map(square, a)
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($_) }
}
}