Recaman's sequence: Difference between revisions
→A stream-oriented solution: documentation
(→{{header|jq}}: second solution) |
(→A stream-oriented solution: documentation) |
||
Line 1,400:
select(.emit) | .emit);
# Input: an integer, $required
#
# Output: the index of the item in the stream s at which the stream up to and including
# that item includes all integers in the closed interval [0 .. $required]
#
def covers(s):
|