News for hackers. Stuff that matters.
Re:Building a Cloud Database from Scratch: Why We Moved from... by iudqnolq on Friday February 10, 2023 @02:01PM (#34744087)
Minor clarification: Elixir uses = for assigment. There's a special construct called "with" that's basically fallible pipes, and that's probably where you saw <-

    with {:ok, id} <- get_id(),
         {:ok, val} <- get_val(id)
    do
        show_success(val)
    else
        {:error, e} ->
            # We reach this if either get_id or get_val fails
            show_error(e)
    end

There are no comments on this comment yet.