Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Is there an anonymous recursion alternative in Ruby? This is the best I could come up with which requires naming.
func = -> (node, func) {
node.children.each do |node|
# do something, func)
}, func)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment