Get the latest tech news

What Is the Difference Between a Block, a Proc, and a Lambda in Ruby? (2013)


Adam Waxman's Blog

Plain old english: Similar to a suitcase, it's a group of code that when opened (i.e. called), contains whatever was in it when you packed it (i.e. created it). Lambda calculus helps make computable functions easier to study by simplifying its semantics. In different languages these may be called functions, routines, methods, or the generic term callable units.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of block

block

Photo of ruby

ruby

Photo of difference

difference

Related news:

News photo

Jack Dorsey's Block Made an AI Agent to Boost Its Own Productivity

News photo

Coding agent in 94 lines of Ruby

News photo

Sony WH-1000XM6 vs WH-1000XM5: What’s the difference?