💎 LearnRuby
Lessons Leaderboard
EN RU
Sign In Sign Up
Lessons Leaderboard
Language: EN RU
Sign In Sign Up
Lessons / Procs and Lambdas
Module 3 Intermediate Ruby 3.4

Procs and Lambdas

Ruby 3.4

Understand blocks, procs, and lambdas - Ruby's callable objects.

Exercise (4)

â—‹
1.

Create a Proc

Create and call a Proc object.

20 points procs closures
â—‹
2.

Lambda vs Proc

Understand the differences between lambdas and procs.

25 points procs lambdas
â—‹
3.

Block to Proc

Convert blocks to procs and vice versa.

20 points blocks procs
â—‹
4.

Compose Functions

Combine multiple procs into one.

25 points procs lambdas

Lesson Info

Beginner
Intermediate
Exercise
4
Total Points
90
Ruby Version
3.4
Sign in to start
Back to all lessons

LearnRuby - Learn Ruby 3.4 with interactive exercises