|
|
|
|
|
by vmarsy
3205 days ago
|
|
I agree on those 2 points. regarding your second point, I don't like this unrolling either. The trick seems to be instead of : return $mylist
Add a comma in front: return ,$mylist
https://stackoverflow.com/a/16122464This will make sure [a] never gets changed to a, and [] never gets changed to $null |
|
For example, instead of
...you can... The return keyword is unnecessary in PowerShell so this can be shortened to: