-
Notifications
You must be signed in to change notification settings - Fork 8.3k
new GPO operator .map #15153
Copy link
Copy link
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-DuplicateThe issue is a duplicate.The issue is a duplicate.WG-Languageparser, language semanticsparser, language semantics
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-DuplicateThe issue is a duplicate.The issue is a duplicate.WG-Languageparser, language semanticsparser, language semantics
in PS there are many operator collections: like
-contains, -join, where, foreach.... every operator performs one specific task very well (except where and foreach GPO "General Purpose Operator"). it's great butsince ps does not yet implement linq it lacks other important operators like:
.map()$collection.map( {code} , arg1, arg2, $collection2 ).map()traverses two lists in parallel, applying a scriptblock to the corresponding items from each list. If one list is longer, the extra elements are ignored.proof of concept: