diff --git a/Exercises/1-seq.js b/Exercises/1-seq.js index bdf0fe8..1e9171a 100644 --- a/Exercises/1-seq.js +++ b/Exercises/1-seq.js @@ -1,5 +1,6 @@ 'use strict'; -const seq = f => g => x => 0; +const seq = f => g => + ((typeof g === 'number') ? f(g) : seq(x => f(g(x)))); module.exports = { seq };
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: