Useless instructions: Difference between revisions

Content added Content deleted
Line 183: Line 183:


For example, consider the 'any' and 'all' functions, all versions of which have short-circuit semantics. The array-oriented versions of these functions are defined in terms of the more fundamental stream-oriented functions, making the redundancy plain to see:
For example, consider the 'any' and 'all' functions, all versions of which have short-circuit semantics. The array-oriented versions of these functions are defined in terms of the more fundamental stream-oriented functions, making the redundancy plain to see:
<lang jq>def all: all(.[]; .);
```
def all: all(.[]; .);

def any: any(.[]; .);
```


def any: any(.[]; .);</lang>


=={{header|Julia}}==
=={{header|Julia}}==