I am trying also to become more familiar with the capabilities of the programming language “XQuery” (and corresponding software libraries).
I achieved some data processing results together with mutable data structures. Now I am looking more at the construction of data structures by the means of functional algorithms. I would appreciate further advices in this design area.
There are very good books on XQuery. I can recommend the following two:
https://www.oreilly.com/library/view/xquery-2nd-edition/9781491915080/ https://www.tamupress.com/book/9781623498290/
It takes some time to grasp the functional nature of the language, but it’s absolutely worth the time.
How do you think about to perform queries by grouping data from arrays (or maps) besides the extraction of contents from XML subtrees?
With XQuery 3.0, a group by clause was introduced [1, 2]. I can be applied to all data structures including arrays (“sequences” are the most basic data structure in XQuery, though).
[1] https://docs.basex.org/wiki/XQuery_3.0#group_by [2] https://www.wilfried-grupe.de/XQuery18.html