For convolution functions, various names are used for each programming language and argument type, such as fold
, reduce
, inject
, etc., but what are the names of the two functions?fold
has unfold
corresponding (F#, Haskell), but I don't know the name of the function corresponding to reduce
, inject
.
I asked because I thought it was necessary to find these functions and define them myself.
Supplement:unfold Specifications
Seq.unfold
in F# is a function that takes the function f
and the initial state s
as arguments and returns the sequence; f
is a function that returns the sequence as option
.
The same goes for Haskell's unfoldr
.
If it is not included in the official library, I think there is probably no standard name for it.Especially as far as I know,
reduce->python
injection->ruby
However, compared to F# and Haskell, the functional color is lighter, so I think that's what happened.
Recently, Java Stream seems to have implemented unfold equivalent features, but since it is Stream.iterate, it may be relatively different depending on the library implementation.
© 2024 OneMinuteCode. All rights reserved.