combine
(
items
,
combining function
)
combined
Type:
For any types
t
(
[
t
]
,
(
t
,
t
) ->
t
)
->
t
Collapses the list into a single item by combining the elements using the given function.
Examples
Click an example to insert it
combine
([
1, 2, 3
]
,
(
? + ?
))
→
6
combine
([
"a", "b", "c"
]
,
(
? ; ?
))
→
"abc"
combine
([
true, false, false, true
]
,
(
? | ?
))
→
true
combine
([]
,
(
? + ?
))
→
error