-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the lambda nature of function args #391
Comments
Yes, that's a bug. So far I don't have a simpler way to reproduce it. The key seems to be that if you pass Adding
I'll have to bisect this... |
This can't be right, I think my check script is wrong: 983a53a is the first bad commit
:100644 100644 341520566f42a788d3dd72300432e6f64503378e 5508e9a274a3bcc890784d287e1d526be834f52b M Makefile.am |
Oh, duh. That means the bug was in 1.3. I may not let this hold up a 1.4 release; we'll see. |
Oh, right, silly me. It's not a bug. Ergo, not a bug. Just surprising. |
@nicowilliams wrote:
I don't follow your explanation. The following shows that zip(.) should receive "." both from its input and from its argument:
|
You should write your zip like:
In the original, when It took me a while to get used to this myself, as it bit me a couple of times. |
@nicowilliams -- thanks for the explanation. I'm on board now! I see also that the jq manual does give a decent explanation. Unfortunately, I skimmed the important parts of the documentation on user-defined functions, and badly misunderstood the statement:
I would propose modifying the paragraph in which this statement occurs so that it reads something like the following:
the expression |
I'll consider some doc improvement for this sort of thing. I've been thinking of a "super-advanced" section for the manual describing this and other things (generators, the comma operator's being a generator, ...) in more detail. |
I believe there's a bug here, but if not, then hopefully the anomaly can be explained and documented.
In the following, zip(_) is defined like so:
and the input is always:
The following shows pairs of jq expressions and their output:
The text was updated successfully, but these errors were encountered: