Examples for 'base::callCC'


Call With Current Continuation

Aliases: callCC

Keywords: programming

### ** Examples

# The following all return the value 1
callCC(function(k) 1)
[1] 1
callCC(function(k) k(1))
[1] 1
callCC(function(k) {k(1); 2})
[1] 1
callCC(function(k) repeat k(1))
[1] 1

[Package base version 4.2.3 Index]