Jump to content

Cycle detection: Difference between revisions

→‎{{header|jq}}: move specifics to the end
(→‎{{header|jq}}: move specifics to the end)
Line 1,304:
|.lambda += 1 )
| {lambda, mu} ;
 
def f: (.*. + 1) % 255;
 
def task(f; x0):
Line 1,315 ⟶ 1,313:
"Cycle:",
skip(.mu; limit((.lambda + .mu); 3 | recurse(f)));
</lang>
'''The specific function and task'''
<lang jq>
def f: (.*. + 1) % 255;
 
task(f;3)
2,458

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.