digitalmars.D.learn - How to import the types mapresult and filterresult
- Alain De Vos (2/2) May 18 2021 Something like:
- Mike Parker (11/13) May 18 2021 You don't. The types returned by map, filter, and other
On Tuesday, 18 May 2021 at 12:15:25 UTC, Alain De Vos wrote:Something like: import X.Y.Z:mapresult ;You don't. The types returned by map, filter, and other algorithms are not public. They're "Voldemort", or anonymous, types. Instances aren't generally intended to be stored, but rather to be completely consumed at the end of a chain of function calls. But if you need to store one in a local variable temporarily, you can use `auto`: ```d auto result = map... ```
May 18 2021