Return an Array
containing the results of mapping transform
over source
.
Declaration
func
map
<
S
:
SequenceType
,
T
>
(
source
:
S
,
transform
: (
S
.
Generator
.
Element
) -
>
T
) -
>
[
T
]
Return an Array
containing the results of mapping transform
over source
.
Declaration
func
map
<
C
:
CollectionType
,
T
>
(
source
:
C
,
transform
: (
C
.
Generator
.
Element
) -
>
T
) -
>
[
T
]
Haskell's fmap for Optionals.
Declaration
func
map
<
T
,
U
>
(
x
:
T
?,
f
: @
noescape
(
T
) -
>
U
) -
>
U
?