simit-lang / simit

A language for computing on sparse systems
http://simit-lang.org
Other
452 stars 52 forks source link

make += operator more explicit #84

Open Lugatod opened 7 years ago

Lugatod commented 7 years ago

Take this example :

func Sum(a:float)->r:float r=3.0; end func TestSum(q:Quad)->a:vectorquads a(q)=Sum(a(q)); a(q)=Sum(a(q)); end`

and then map this function

a=map TestSum to quads reduce +; print "Value of a ", a;`

The value of a is 6.0