can we expect a function like:

  sum [x*y | (x,y) <- zip (elems v) (elems u)]

to be as efficient as, say:

sum = 0
for i=1, n
  sum = sum + v[i] * u[i]

?

Basically, will any intermediate lists be created here?

--
Hal Daume III

 "Computer science is no more about computers    | [EMAIL PROTECTED]
  than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume

_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to