-type state() ::
#{id => binary(),
atom => 'clojerl.Atom':type(),
delivered => boolean(),
pending => queue:queue()}.
-type type() ::
#{'__type__' => 'clojerl.Promise',
id => binary(),
ref => reference(),
atom => 'clojerl.Atom':type(),
pid => pid()}.
-spec '__new__'() -> type().
-spec init({binary(), 'clojerl.Atom':type()}) -> {ok, state()}.