## 绑定函数

_.memoize(function, [hashFunction])

Memoizes方法可以缓存某函数的计算结果。对于耗时较长的计算是很有帮助的。

hashFunction 默认使用function的第一个参数作为key。memoized值的缓存可作为返回函数的cache属性。

``````    var fibonacci = _.memoize(function(n) {
return n < 2 ? n: fibonacci(n - 1) + fibonacci(n - 2);
});
``````
{"ft_lang_label":"__label__zh","ft_lang_prob":0.820664,"math_prob":0.9763377,"size":332,"snap":"2020-24-2020-29","text_gpt3_token_len":158,"char_repetition_ratio":0.19512194,"word_repetition_ratio":0.0,"special_character_ratio":0.21385542,"punctuation_ratio":0.17073171,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9618743,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-06-02T07:39:52Z\",\"WARC-Record-ID\":\"<urn:uuid:383269d2-1daf-40a7-a6ff-9eb1be9b459a>\",\"Content-Length\":\"20203\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ee2c8061-ac50-4874-bc54-2e04ac64824a>\",\"WARC-Concurrent-To\":\"<urn:uuid:d17d773b-c773-46e0-9501-7225b7f7ec3c>\",\"WARC-IP-Address\":\"118.190.106.8\",\"WARC-Target-URI\":\"http://cw.hubwiz.com/card/c/569b99a4acf9a45a69b0513f/1/4/3/\",\"WARC-Payload-Digest\":\"sha1:IYJ65N5EVA3LSKLETMN5U44A3DKQOWEL\",\"WARC-Block-Digest\":\"sha1:AD2HANSW6VTAYLJ25UZR55FBFVQ6YIAF\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-24/CC-MAIN-2020-24_segments_1590347423915.42_warc_CC-MAIN-20200602064854-20200602094854-00080.warc.gz\"}"}