3 ms·
To be clear, you can autoderive the JSON encoding for Aeson, too. I just wanted to demonstrate the full thing. Also, the XPath implementation I noted is specia
by tel 12y ago
To be clear, you can autoderive the JSON encoding for Aeson, too. I just wanted to demonstrate the full thing.
Also, the XPath implementation I noted is special over Rust's because it forms a Lens (Prism, really) so you can get and set at arbitrary positions or even sequences of positions:
v & ix 3 . each . _Integer %~ succ
The above increments each integer in the array stored at index 3 of `v` if one exists.