Ordered words: Difference between revisions
Content added Content deleted
(→{{header|jq}}: is_sorted via until) |
m (→{{header|jq}}: rm extraneous #) |
||
Line 1,756: | Line 1,756: | ||
});</lang> |
});</lang> |
||
=={{header|jq}}== |
=={{header|jq}}== |
||
{{works with|jq|1.4}} |
|||
<lang jq># If your jq already defines until/2 then the following definition can be omitted: |
<lang jq># If your jq already defines until/2, then the following definition can be omitted: |
||
def until(cond; next): |
def until(cond; next): |
||
def _until: if cond then . else (next|_until) end; |
def _until: if cond then . else (next|_until) end; |