Elektrine lite

← Feed

@jnkrtech@social.treehouse.systems

Post #401446

2026-02-25 00:58 UTC

I’m searching for examples for a blog post. Does anyone have unusual examples of mutual recursion in the wild? #programming

Replies (3)

  • @abnv@fantastic.earth 2026-02-25 01:33

    @jnkrtech unusual how?

    Open ##1865890

  • @renedudfield@fosstodon.org 2026-02-25 02:00

    @jnkrtech does that mean functions which call into each other recursively back and forth? A while ago it was unusual to me to see in a react app error boundary components having errors inside them which then go into suspense boundaries. Back and forward between the boundaries and other parts of the error handling. Also saw some odd (to me) looping behavior I was trying to figure out between a k8s scheduler and resources which schedule resources which go into the schedulers back and forth.

    Open ##1865892

  • @jnkrtech How "wild"? I've got some non-uniform recursion in an Idris library I recently published. https://stefan-hoeck.github.io/idris2-pack-db/docs/type-aligned/docs/docs/TypeAligned.src.html#line270 I've also got recursion across multiple types (merged into a single indexed family) "fully" generalized in the Haskell version of another published Idris library (the Haskell version is not published). https://gitlab.com/bss03/nested/-/blob/31f74ced9067ff04b80fbe22ab5b5f153436f6ea/test/hs/Main.hs#L133

    Open ##1865894