Software
Placeholder

coro

Coroutines for R

R

The coro package implements coroutines for R, which are functions that can be suspended and resumed. It provides two main types: async functions for concurrent programming and generators for iterating over complex sequences.

This package simplifies asynchronous code by using async/await syntax instead of nested promise callbacks, making concurrent operations more readable and maintainable. It supports suspending within loops, conditionals, and error handling blocks, includes debugging capabilities, and integrates with existing R packages like promises, future, and reticulate. The package works by transforming user code into state machines while preserving source references for debugging.

Contributors