Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Faheem-Khan97/javascript-coding-problems-with-theory
/ compose
Function
compose
compose&pipe/compose.js:27–27 ·
view source on GitHub ↗
(...fns)
Source
from the content-addressed store, hash-verified
25
// Compose way
26
27
const
compose = (...fns) => (value) => fns.reduceRight((acc,fn) => fn(acc), value)
28
29
console.log(compose(subtract, multiply, sum)(5))
Callers
1
compose.js
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected