Skip to content

Instantly share code, notes, and snippets.

@mh-github
Created February 21, 2015 19:56
Show Gist options
  • Select an option

  • Save mh-github/11d4b1a6e13798d06b1e to your computer and use it in GitHub Desktop.

Select an option

Save mh-github/11d4b1a6e13798d06b1e to your computer and use it in GitHub Desktop.
Ruby example for function in a function by using lambda
def outer(a)
b = 6
l = lambda do |a, b|
print a + b
end
l.call(a, b)
end
outer(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment