
11 Mar
2009
11 Mar
'09
6:55 p.m.
Daniel Fischer ha scritto:
[...]
genericSumU :: (UA e, Integral e) => UArr e -> Int genericSumU = foldU add 0
That would have to be foldlU, the type of foldU is foldU :: UA a => (a -> a -> a) -> a -> UArr a -> a
while foldlU :: UA a => (b -> a -> b) -> b -> UArr a -> b
Damn... I was reading the source code of uvector, where foldU = foldlU and I totally forgot to check types. Thanks Manlio