mapIn (method)
map
In
map
In
<
R
,
U
>
(
this
,
f
)
:
Opt
<
R
[]
>
Applies a map function to an array inside.
Type Parameters
R
U
Parameters
this
:
Some
<
U
[]
>
f
:
(
(
x
)
=>
R
)
(
x
)
:
R
Parameters
x
:
U
Returns
R
Returns
Opt
<
R
[]
>
Example
opt
([
1
,
2
,
3
]).
mapIn
(
x
=>
x
+
1
)
// Some([2, 3, 4])
Back to index
Applies a map function to an array inside.