Skip to content
the poor coder

Home / Topics / #ruby

#Ruby

41 posts · page 2 of 3
2020

Hackerrank Lambdas Solution

Lambdas are anonymous functions. Lambdas in Ruby are objects of the class Proc. They are useful in most of the situations where you would use a proc. The simplest lambda takes no argument and returns nothing as shown…

2020

Hackerrank Procs Solution

Passing blocks is one way to pass functions as arguments to other functions. Blocks are one of the very few exceptions to the "everything is an object" rule in Ruby. Blocks are not objects, and they can't be saved to…

2020

Hackerrank Blocks Solution

Higher order functions are one of the key components of functional programming. A higher order function is a tool that takes other functions as parameters or returns them as a result. Blocks are nameless methods that…

ESC