From 11387ab4789554ccd73dcee8fe9403ad78146caf Mon Sep 17 00:00:00 2001 From: stoeffel Date: Mon, 23 Feb 2015 12:51:39 +0100 Subject: [PATCH] add arity example --- readme.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index d92a59c..d7eb6f3 100644 --- a/readme.md +++ b/readme.md @@ -5,19 +5,29 @@ __Let's try and define these with examples, this is a WIP please feel free to send PR ;)__ -## Arity +## Arity + +> The number of arguments a function takes. + +```js +const sum = (a, b) => a + b; + +const arity = sum.length; +console.log(arity); +// => 2 +// The arity of sum is 2 +``` + + +## Purity --- -## Purity +## Side effects --- -## Side effects - ---- - -## Idempotency +## Idempotency ---