Skip to content
the poor coder

Home / Author

Poor Man

2,994 posts
2020

Hackerrank Lazy Evaluation Solution

Lazy evaluation is an evaluation strategy that delays the assessment of an expression until its value is needed. Ruby introduced a lazy enumeration feature. Lazy evaluation increases performance by avoiding needless…

2020

Hackerrank Currying Solution

Currying is a technique in which a function accepts parameters and turns it into a sequence of functions, each of them take 1 parameter. Example :- In the above example, lambda take two parameters , and return the…

2020

Hackerrank Closures Solution

Closure is a function/method that: ► Can be passed around like an object. It can be treated like a variable, which can be assigned to another variable, passed as an argument to a method. ► Remembers the value of…

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…

ESC