
12 Oct
2011
12 Oct
'11
5:14 a.m.
Bas van Dijk wrote:
Hello,
I'm trying to make the following faster:
Data.Vector.Generic.fromList list
where 'list' is some expression yielding a list.
Unfortunately, I don't think that's possible. The problem is that you 'list' will be expressed in terms of foldr/build and fromList would have to produce a Stream, i.e., basically an unfoldr. But AFAIK, there is no unfoldr/build fusion rule. There is one the other way round and vector makes use of that in toList. Roman