Comment #0 by john.michael.hall — 2020-06-25T15:56:18Z
On the dlang site here: https://dlang.org/library/std/functional/pipe.html
the following documentation comment is partially shown and then cut off strangely. However, this is also the documentation for memoize and not pipe. It should not be shown at all.
/**
* $(LINK2 https://en.wikipedia.org/wiki/Memoization, Memoizes) a function so as
* to avoid repeated computation. The memoization structure is a hash table keyed by a
* tuple of the function's arguments. There is a speed gain if the
* function is repeatedly called with the same arguments and is more
* expensive than a hash table lookup. For more information on memoization, refer to $(HTTP docs.google.com/viewer?url=http%3A%2F%2Fhop.perl.plover.com%2Fbook%2Fpdf%2F03CachingAndMemoization.pdf, this book chapter).
Example:
----
double transmogrify(int a, string b)
{
... expensive computation ...
}
alias fastTransmogrify = memoize!transmogrify;
unittest
{
auto slow = transmogrify(2, "hello");
auto fast = fastTransmogrify(2, "hello");
assert(slow == fast);
}
----
Comment #1 by john.michael.hall — 2023-02-08T19:45:36Z
My hunch is that the problem is associated with the top part of memoize using the * along the end, but then dropping it later for the Params section.