www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to import the types mapresult and filterresult

reply Alain De Vos <devosalain ymail.com> writes:
Something like:
import X.Y.Z:mapresult ;
May 18 2021
parent Mike Parker <aldacron gmail.com> writes:
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