App Development Tutorials
Markdown supported · ⌘↵ to post
One Liner for Infinite currying of above sum function is as per below:
const sum = a => b => b ? sum(a + b) : a;
Infinite currying one liner
const mu = (num1) => (num2) => num2 ? mu(num1 + num2) : num1;
Aman Chandel
amazingly explained Piyush..... Loved it.