Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right and left sparrows #89

Open
cognivore opened this issue Oct 22, 2021 · 1 comment
Open

Right and left sparrows #89

cognivore opened this issue Oct 22, 2021 · 1 comment

Comments

@cognivore
Copy link

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?

@cognivore
Copy link
Author

In case anyone needs a simple abstraction for this stuff and similar stuff, I have it in DynHacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant