Update higher-order function examples to match latest spec. Add examples for XQ3.1 maps. Fix json example.