Tag

#factorial

3 posts

Resonate brand card on a dark background with a plum spectrum wave at the bottom and the post headline in white Sansation.
4 min readResonate HQJust published

Recursive durable factorial in Python on Resonate

How a self-calling function stays durable and content-addressed when every invocation is its own durable promise.

A Resonate Python worker computes factorial recursively across a worker pool. Each invocation is a durable promise keyed by the input, so prior results are returned from the store on replay without re-execution.

Resonate brand card on a dark background with an ember spectrum wave at the bottom and the post headline in white Sansation.
4 min readResonate HQJust published

Recursive workflow with cached results in Rust on Resonate

How a single recursive function plus durable-promise IDs gives you distributed computation and a permanent result cache in one shape.

Compute factorial(n) by having one function call itself across a worker group. Each call pairs with a durable promise keyed by n, so previously computed results return without recomputing.