In Elixir's core lib, there is a function called Stream.unfold/2.
When I first started to have a look at this function, I could not make sense of ...
For further actions, you may consider blocking this person and/or reporting abuse
I think the general term for what unfold/2 implements is an anamorphism, while fold is a catamorphism. There are other kinds of morphisms too - this page gives an overview (with fun mnemonics!): reasonablypolymorphic.com/blog/rec...
Thanks, didn't know those terms. I tried quick-reading the post you linked to, but I think it's the kind of post I need focus to read π Goes to my reading list π
I would not say that
Stream.unfold
is a bad name, however, for folks of my generation it is what we know ascons_stream
from SIOCPI didn't know that βΊοΈ