From 1dd55fb54c4b88eb15d6faf97c490deba961c755 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 22 Dec 2017 09:44:59 +0200 Subject: [PATCH] Minor formatting --- snippets/collectInto.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/snippets/collectInto.md b/snippets/collectInto.md index 468e2af80..8f9b34cd4 100644 --- a/snippets/collectInto.md +++ b/snippets/collectInto.md @@ -1,11 +1,11 @@ -### Colect Into +### collectInto -Changes a function that accepts an array into a variadic function +Changes a function that accepts an array into a variadic function. -Given a funciton, return a closure that collects all inputs into an array accepting function +Given a function, return a closure that collects all inputs into an array-accepting function. ```js -const collectInto = fn => ( ...args ) => fn( args ) +const collectInto = fn => ( ...args ) => fn( args ); /* const Pall = collectInto( Promise.all.bind(Promise) ) var p1 = Promise.resolve(1) @@ -13,4 +13,4 @@ var p2 = Promise.resolve(2) var p3 = new Promise((resolve) => setTimeout(resolve,2000,3)) Pall(p1, p2, p3).then(console.log) */ -``` \ No newline at end of file +```