With backpassing gone, I feel like I have to rearrange the !
often when pipelining tasks (make sure it's only on the last task). Is there like an "identity" task or something I can throw on the end of a task chain just to always act as the final task to await on? So instead of:
|> Task.fromResult
|> Task.mapErr! (\_ -> "Failed to find enum $(enumName)")
something like:
|> Task.fromResult
|> Task.mapErr (\_ -> "Failed to find enum $(enumName)")
|> Task.do!
The issue I run in to is I'll write a single task, then realize I need to pipe it into another task like Task.mapError, but I forget to move the ! and it takes a while to figure out what the compiler is complaining about
I haven't tried it, but I believe just the identity function would work!
Last updated: Jul 06 2025 at 12:14 UTC