David, thanks, I feel less miserable :)

The point is that I want a map (maps are standard in XQUERY) but that can
handle nodes or functions as keys, provided an external ordering function
is given. I also want a stack having the same properties. Such containers
does not exists, thus I decided to write them in pure xquery. My motivation
was to exercise myself, as well as testing whether xquery could fit my
algorithmic needs. I did it, starting with John Snelson work, that kindly
point me out its work over this topic.

I thought that my code and John Snelson one had not the desired complexity
while profiling my code. I was just wrong. All this conversation took place
because I made bad measurements :(






2013/12/3 David Lee <[email protected]>

>  Jean-marc,  I completely understand your frustration with the lack of
> "standard" data types like double linked lists, maps, stacks etc.
>
> I also had the same problem at first.   However in general I have found
> that looking for these types meant I was trying to solve the problem in a
> way
>
> which is not the best way in a functional language, and that there were
> other ways of solving the same problem - often more elegantly.
>
>
>
> So I suggest you describe to the group, at a higher level, what kinds of
> problems you are trying to solve where you feel these data types are
> necessary.
>
> It may be that there are better ways of solving the problem without them.
>
> Or it may be that these types are really needed and things like johns rb
> tree should be suggested as standard or atleast common libraries (such as
> in functx).
>
>
>
>
>
>
>
> ----------------------------------------
>
> David A. Lee
>
> [email protected]
>
> http://www.xmlsh.org
>
>
>
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to