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