3 ms·
> it's strange that the home page of a parallel language doesn't give an example of parallel code Read the page again :) Func Sum_Of_Squares(N : Int) -> Int i
by oblio 8y ago
> it's strange that the home page of a parallel language doesn't give an example of parallel code
Read the page again :)
Func Sum_Of_Squares(N : Int) -> Int is
// Built-in and inherently parallel map-reduce
// Initial value is enclosed with angle brackets
return (for I in 1 .. N => <0> + I ** 2)
end func Sum_Of_Squares
- pmontra 8y agoThanks! Invisible parallel code is a good idea. Less code to write.