Platform
Resources
Pricing
Sign in
Get started
Toan Nguyen
Workspace
Fork
Published
By
Toan Nguyen
Edited
Oct 10, 2018
Insert cell
md
`# Compose
${
compose
(
x
=>
x
*
2
,
(
x
,
y
)
=>
x
+
y
)
(
10
,
2
)
} // 24
`
Insert cell
function
compose
(
...
fns
)
{
return
(
...
args
)
=>
{
return
fns
.
reduceRight
(
(
result
,
fn
)
=>
[
fn
.
call
(
null
,
...
result
)
]
,
args
)
;
}
;
}
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
compose
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML