Skip to content

runtime-debug-all/BlockandYeild_Proc_Lambda_output

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Test output will be located in test.rb file.

will give example output for:

  1. Block and Yield,
  2. Proc,
  3. Lambda,
  4. there is also Methods.

why? because decisions must be made. helpful links:
http://awaxman11.github.io/blog/2013/08/05/what-is-the-difference-between-a-block/
http://www.eriktrautman.com/posts/ruby-explained-blocks-procs-and-lambdas-aka-closures

output could be improved to give comments on each thing.
block and yeild
1!2!3!

block without yeild
246

block using do
2
4
6

Proc using &
2
4
6

Proc using .call
Hello World

Lambda using &
2
4
6

Lambda using .call
Hello World

Releases

No releases published

Packages

No packages published

Languages