Partial application pre-fills some arguments of a function, returning a new function that accepts the rest.
// without partial — repeat the base config everywhere
fetchData('https://api.example.com', 'GET', '/users');
fetchData('https://api.example.com', 'GET', '/posts');
// with partial — lock in the repeated args
const getFromApi = partial(fetchData, 'https://api.example.com', 'GET');
getFromApi('/users');
getFromApi('/posts');Implement partial(fn, ...presetArgs) that returns a new function pre-filled with presetArgs.
solve(label, ...args) dispatches to predefined partials:
'add5' → partial of (a,b)=>a+b with first arg 5'multiply3' → partial of (a,b)=>a*b with first arg 3'greet' → partial of (greeting,name)=>greeting+' '+name with 'Hello'Sample tests