maxIters
untyped bigintmaxIters caps the Collatz walk so a hostile / huge input cannot loop forever on-chain. No known n stays below this bound and fails to reach 1.
Value
(1000000 <untyped> bigint)
maxSeqLen
untyped bigintmaxSeqLen caps how many terms Render("/\<n>") will print.
Value
(500 <untyped> bigint)
Result
typeResult is one recorded submission.
Value
v0.Result
results
v0.Treeresults maps a decimal-string key of N -> Result. avl.Tree keeps a deterministic order for iteration inside Render.
- OID
- 09b096…5ecf:4
results details
stopping
func(n int64) (steps int, peak int64)stopping returns the number of steps to reach 1 and the peak value seen, walking the Collatz (hailstone) map. It never mutates state.
- OID
- 09b096…5ecf:5
stopping details
Compute
func(n int)Compute walks the hailstone sequence for n and records the result attributed to the caller. It is a crossing (state-mutating) func.
- OID
- 09b096…5ecf:7
Compute details
byLongest
typebyLongest implements sort.Interface, ordering results by steps desc, then peak desc, then n asc for stability.
Value
v0.byLongest
Render
func(path string) stringRender shows the leaderboard at root, or the full hailstone sequence for a given n at path "/\<n>".
- OID
- 09b096…5ecf:8
Render details
renderLeaderboard
func() string- OID
- 09b096…5ecf:9
renderLeaderboard details
renderSequence
func(p string) string- OID
- 09b096…5ecf:10