You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would you be interested in a contribution that would add an iterator or folder over the nodes? For instance, the use-case would be to get all the classes defined in a document.
The text was updated successfully, but these errors were encountered:
Something like val fold_attrs: ('a -> (string * string) -> 'a) -> 'a -> node -> 'a ? Ie. fold a function over all the attributes of a node and its children. I've picked fold_left here, but I'm fine with whatever argument order. As attr and node are abstracts (as they should be!), it's impossible to write such a function outside the lib.
To be honest I'm not totally sure but would you mind sending the PR and a couple of tests? If the implementation is reasonable I'll just merge it. Let's do this signature:
valfold_attrs : ('a -> name:string -> value:string -> 'a) -> 'a -> node -> 'a
Would you be interested in a contribution that would add an iterator or folder over the nodes? For instance, the use-case would be to get all the
classes
defined in a document.The text was updated successfully, but these errors were encountered: