Open cognivore opened 3 years ago
I'd like to write this:
res = naive_run_receive_loop(Resp.new!(p, []), command, timeout) try do Port.close(p) rescue _ -> :ok end res
as
naive_run_receive_loop(Resp.new!(p, []), command, timeout) <* close(p) # ... defp close(p) do try do Port.close(p) rescue _ -> :ok end end
But I can't find the necessary operator. Am I missing something or it's currently impossible?
In case anyone needs a simple abstraction for this stuff and similar stuff, I have it in DynHacks.
DynHacks
I'd like to write this:
as
But I can't find the necessary operator. Am I missing something or it's currently impossible?