Apply a callback to an array: Difference between revisions
Content added Content deleted
(added PostScript) |
|||
Line 1,104: | Line 1,104: | ||
To create a new array from the results above code can simply be wrapped in <code>[]</code>: |
To create a new array from the results above code can simply be wrapped in <code>[]</code>: |
||
<lang postscript>[ [1 2 3 4 5] { dup mul } forall ]</lang> |
<lang postscript>[ [1 2 3 4 5] { dup mul } forall ]</lang> |
||
{{libheader|initlib}} |
|||
<lang postscript> |
|||
[1 2 3 4 5] {dup *} map |
|||
</lang> |
|||
=={{header|PowerShell}}== |
=={{header|PowerShell}}== |