3 ms·
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 squ
by Ono-Sendai 12y ago
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)
- nine_k 12y agoNow make it efficiently parallel and show us the implementation. Then we could compare it with the Elixir snippet, which does just that.
- kbenson 12y agoWell, if we are putting forth other languages, here's Perl 6: sub pmap(Code $func, @items) { return await @items.map: { start { $func($_) } } }