[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: (kick,ass): => kick( ass ) ::
- From: pan shizhu <pan.shizhu@...>
- Date: Sun, 7 Feb 2010 08:56:02 +0800
> function(eat,food) return eat( food ) end
> becomes
> (kick,ass): => kick( ass ) ::
How do you want to transfer this one:
function(eat, food)
if thirsty then drink_first() end
update_food_status()
return eat(food)
end
The advantage for lua anonymous function is that it has not
limitations about what can be inside the function. While python-style
lambda function seems fairly useless to me, compared to lua function.