def hex_walk
import bend-collections@1.0.0.0/src/crypto/keccak/hex.bend as Heximport Base
26# Formatting helper consumes eight words; it does not create a digest list.
27def hex_walk(n: Nat, +index: U32, pair: Array<U32> & U32) -> String:
28 match n pair:
29 case 0n Tuple{a,w}: hex_word(w)
30 case 1n+p Tuple{a,w}: hex_word(w) ++ hex_walk(p,U32.inc(index),Array.get(U32,a,index))