Ruby vs JavaScript: functions, Procs, blocks and lambdas