Refactor underlying implementation to use a Proc
Move recursive implementation into Proc reopening and rename to 'ruby-function'