zoukankan      html  css  js  c++  java
  • 函数柯里化

    一、定义

    维基百科中对柯里化 (Currying) 的定义为:

    In mathematics and computer science, currying is the technique of translating the evaluation of a function that takes multiple arguments (or a tuple of arguments) into evaluating a sequence of functions, each with a single argument.

    翻译成中文:

      在数学和计算机科学中,柯里化是一种将使用多个参数的一个函数转换成一系列使用一个参数的函数的技术。

    二、用途

      curry 的这种用途可以理解为:参数复用。本质上是降低通用性,提高适用性。

  • 相关阅读:
    菜根谭#298
    菜根谭#297
    菜根谭#296
    菜根谭#295
    菜根谭#294
    菜根谭#293
    菜根谭#292
    菜根谭#291
    菜根谭#290
    菜根谭#289
  • 原文地址:https://www.cnblogs.com/lulin1/p/9681301.html
Copyright © 2011-2022 走看看