Showing posts with label procs. Show all posts
Showing posts with label procs. Show all posts

Tuesday, 12 July 2016

Select Map

Difficulty:
Easy

Tags:
enumerables, procs

Instructions:
The Pattern object not only functions as a Regexp. For example, check out what happens if you do Pattern === element. This problem demonstrates that using a Pattern with #grep will work much like using select and map in combination.

Problem and Solution:

The Lambda Lambda Lambda Fraternity

Difficulty:
Easy

Tags:
lambdas, procs, ruby 1.9

Instructions:
Write a proc or lambda that'll take one or two numbers and return true if one or both numbers are even.

Problem and Solution: