# Arity & Currying

Home / Blogs / Arity & Currying

This is a series of blogs where I collect some interesting programming concepts, new things I learn

Arity represents the number of arguments we pass to a function (or module). Say you may pass N args to a function.

Currying is the process of reducing the number of arguments you pass to 1 but increase the number of functions to N.

For Eg. To add three variables a, b and c you may write func like below

``````function add (a,b,c){
return a+b+c;
}

Currying the same above function is then like below

``````function add (a){
return a+b+c;
};
};
}
{"ft_lang_label":"__label__en","ft_lang_prob":0.8780938,"math_prob":0.82403153,"size":1213,"snap":"2021-43-2021-49","text_gpt3_token_len":272,"char_repetition_ratio":0.1579818,"word_repetition_ratio":0.0,"special_character_ratio":0.23330586,"punctuation_ratio":0.09876543,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95939267,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-28T11:23:21Z\",\"WARC-Record-ID\":\"<urn:uuid:cd8b41f6-9553-44c5-b1c9-f8716ed7a36c>\",\"Content-Length\":\"57801\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1fe41562-479b-4490-b3b4-35741646f320>\",\"WARC-Concurrent-To\":\"<urn:uuid:6d550955-8336-441b-9393-fa9529b68932>\",\"WARC-IP-Address\":\"104.154.62.33\",\"WARC-Target-URI\":\"https://digiajay.com/2021/06/24/arity-currying/\",\"WARC-Payload-Digest\":\"sha1:IXV7TKLZJG6ANKURCM4P7C6G2PIEWWCM\",\"WARC-Block-Digest\":\"sha1:4T3ZTA5DJ76LZTFCC6RFPUWXLBLHA3WF\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323588284.71_warc_CC-MAIN-20211028100619-20211028130619-00418.warc.gz\"}"}