array::fold, array::split #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
foldto array::foldalong with fold, its inverse split may be defined
actually, fold induces a loss of information such that to consider split as its inverse in the sense that the two would cancel one another is flawed
summing by addition cannot be undone to recover the original set solely from the result
but this is not necessarily the case, as an operation such as string::join would not incur information loss and could be split back
what property of a function corresponds to whether it is able to be reversed ?
"able to be reversed" really means that the function is bijective, in that any input element maps to exactly one output element
in the case of addition, this is not the case ; the cardinalities of the function's domain and codomain being equal is not a requirement strong enough to prevent im tired
array::foldto array::fold, array::splitwithout going as far as abstracting function pointers behind structures containing their properties, i will opt for array::fold to take an optional third argument
sizer, leaving the assumption of bijectivity to the caller in the form of either passing a valid function address or a null pointer.