I have a function which loops through/transvers something, and I want it to recieve a reference to a function which sets the stop creiteria/do something.
For example, in a class:

```
def a(func_stop,i)
   ret = nil # default
   while(i < 0 ) 
      if (func_stop(@lines[i]))
        ret = i
        break
      end
   end
   return ret
end

```

The idea is that I can pass a reference to the function, kinda like PERL'S 

```
func1(\&func, $i);

```

I have looked, but failed to find something like this.
Thanks