digitalmars.D.bugs - [Issue 20976] New: pipe documentation incorrectly renders part of
- d-bugmail puremagic.com (44/44) Jun 25 2020 https://issues.dlang.org/show_bug.cgi?id=20976
https://issues.dlang.org/show_bug.cgi?id=20976 Issue ID: 20976 Summary: pipe documentation incorrectly renders part of memoize Product: D Version: D2 Hardware: All URL: http://dlang.org/library/std/functional.html OS: All Status: NEW Severity: enhancement Priority: P3 Component: phobos Assignee: nobody puremagic.com Reporter: john.michael.hall gmail.com 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); } ---- --
Jun 25 2020