That was just a minimal example, the actual stuff in <https://effect.website/> 
and <https://zio.dev/> are much more advanced. Structured concurrency, 
parallelism, error management, retries, dependency injection, request batching, 
caching, tracing, scheduling, streaming, STM (software transactional memory), 
schemas/parsing, fully typed rpc, an insane amount of composability, and tons 
more are all built from the primitive concept of `SomeType[A,E,R]`. It's a 
really powerful model.

So there's currently no way in nim to express the following function?
    
    
    proc foo[T,U](t: T, u: U): T or U =
        if rand(1..10) > 5:
            t
        else:
            u
    
    
    Run

If this is not possible could you help me understand why?

Reply via email to