Leo,
Thx for your answer and the release. I'll check the release, but even 13 s to produce a sequence of 100000 integer is a shot-down for my purposes.
I think that there are two quick work-around however, waiting for super clojure sequences.
- The first one is on my side, but I don't like it : I must bound my code to handle sequence of functors, and can't work with functor of functor. This might be a serious limitation to what I wanted to do with XQUERY.
- Another suggestion, that might be quick and efficient, would be to add a direct optimized access to the functor
id($el) as function() as item()* {function(){ $el }}
into a BaseX module. For instance it could be pertinent to place it as hof:id-functor, since you already introduced hof:id. I think that there are two points of view here :
1) From the user point of view, this would greatly improve the range of algorithmic possibilities. Moreover, it is already possible to produce functor of functor of .... Thus we remain XQUERY coherent.
2) From the BaseX point of view, I don't know... Such a functor would become "de facto" a super type for XQUERY type hierarchy, since every XQUERY types could be casted into that functor (it would be above item, because it contains empty-sequences).
Cheers
Jean-Marc