Hi. The attached version works for me. But I think the function should probably be called "define-cycle-or-exec", just "cycle-or-exec" may be confusing. Additionally, cycle-or-exec-backend makes it possible to use functions for `prog', but in that case `prog' should not be used in the constructed names of the cycling commands (it maybe shouldn't be used for generic shell command strings as well...)
Attachment:
cycle-or-exec.jl
Description: Binary data