Skip to content

Instantly share code, notes, and snippets.

@muxueqz
Created August 7, 2014 03:42
Show Gist options
  • Save muxueqz/728962332258b3d59cb4 to your computer and use it in GitHub Desktop.
Save muxueqz/728962332258b3d59cb4 to your computer and use it in GitHub Desktop.
def curry(x)
u = bigObj(x)
def f1(y);
def f(a, b):
pass
return f(u, 10)
curr(10)(1) # 局部变量 u 会被创建
curr(10)(2) # 这是 u 会重新被创建,还是使用上一个语句 u 的缓存
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment