Is it ok to use lambda just locally? Languages

Is it ok to use lambda just locally?

Is it alright to define a lambda function to be used only locally, that is in the current block (function/method)? Consider the situation when some code is going to be executed several times (so it'd be logical to put it into a function) but it will never be used outside...
Read More