Recaman's sequence: Difference between revisions

Content added Content deleted
(→‎{{header|jq}}: second solution)
Line 1,400: Line 1,400:
select(.emit) | .emit);
select(.emit) | .emit);


# Input: $required
# Input: an integer, $required
# Output: the number of items that must be generated in order that all the integers
# 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] be found.
# that item includes all integers in the closed interval [0 .. $required].
#
#
def covers(s):
def covers(s):