Hacker News new | past | comments | ask | show | jobs | submit login

In fact, jq already has `map`, which would replace the article's pattern of `[.[]|add]` with `map(add)`. It is defined as such:

    def map(f): [.[] | f];
Many built-in functions in jq are implemented in jq, in terms of a small set of core primitives. The implementations can be inspected in builtin.jq.

https://github.com/stedolan/jq/blob/master/src/builtin.jq#L3




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: