lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>   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.