推荐关注
› Meteor
› JSLint - a JavaScript code quality tool
› jsFiddle
› D3.js
› WebStorm
推荐书目
› JavaScript 权威指南第 5 版
› Closure: The Definitive Guide
jacob

如何学习 high order function 概念

  •  
  •   jacob · Aug 17, 2014 via iPhone · 3845 views
    This topic created in 4477 days ago, the information mentioned may be changed or developed.
    函数参数是函数体,函数返回值是一个函数体,这还好理解,可是还有函数内定义函数,同时调用父函数,我这思路跟不上,这怎么执行,迷糊啊。
    7 replies  •  2014-08-19 08:38:33 +08:00
    sivacohan
    sivacohan
    Aug 18, 2014 via Android
    1
    你的描述和你的问题不是一个。
    你的问题如果中文对应的是高阶函数,那你应该搜柯理化。
    你描述的问题,函数内再声明函数,我建议去看看闭包。
    seeker
    seeker
    Aug 18, 2014
    2
    函数内定义函数,同时调用父函数
    这个跟higher order function的概念貌似没什么关系。
    seeker
    seeker
    Aug 18, 2014
    3
    @sivacohan 柯理化跟高阶函数也不是一样东西。Javascript就支持高阶函数,但是没有柯理化。
    sivacohan
    sivacohan
    Aug 18, 2014 via Android
    4
    @seeker 我对js支持柯理化的记忆来自于, Javascript语言精粹。 如果是我记错了,请指出。
    jacob
    jacob
    OP
    Aug 18, 2014 via iPhone
    5
    跑偏了,higher order function=first class function。
    seeker
    seeker
    Aug 18, 2014
    6
    @sivacohan 我错了,js是可以实现科里化的,虽然不像haskell/ml/scala那样原生支持的
    arbipher
    arbipher
    Aug 19, 2014
    7
    @sivacohan 李菊福
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4436 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 06:07 · PVG 14:07 · LAX 22:07 · JFK 01:07
    ♥ Do have faith in what you're doing.