Simplified version of call/cc for test purposes