#unfoldr
behold: my best attempt at printing the first 10,000 primes in rust, lua, fennel and haskell
January 7, 2025 at 12:52 AM
oomfAddition a b = unfoldr (\x -> Just (x + 1, x + 1)) a !! b

:)
May 7, 2025 at 3:08 PM
the authors mention that the earlier, and more widespread, fusion techniques of build/foldr fusion and destroy/unfoldr fusion, as well as and older variant of stream fusion, did not suffice to produce this rather gnarly fusion
August 25, 2025 at 7:37 AM
🚀 just uploaded (link in reply): "List Unfolding -
unfold as the Computational Dual of fold,
and how unfold relates to iterate" #folding #unfolding #fold #unfold #foldL #foldL_prime #unfoldL #unfoldL_prime #unfoldr #iterate #anamorphism #catamorphism #functional_programming #scala #haskell
May 31, 2025 at 10:46 AM