RDF.Graph.pop

You're seeing just the function pop, go back to RDF.Graph module for more information.

Specs

pop(t()) :: {RDF.Statement.t() | nil, t()}

Pops an arbitrary triple from a RDF.Graph.

Specs

Pops the description of the given subject.

When the subject can not be found the optionally given default value or nil is returned.

Examples

iex> RDF.Graph.new([{EX.S1, EX.P1, EX.O1}, {EX.S2, EX.P2, EX.O2}])
...> |> RDF.Graph.pop(EX.S1)
{RDF.Description.new(EX.S1, init: {EX.P1, EX.O1}), RDF.Graph.new({EX.S2, EX.P2, EX.O2})}
iex> RDF.Graph.new({EX.S, EX.P, EX.O}) |> RDF.Graph.pop(EX.Missing)
{nil, RDF.Graph.new({EX.S, EX.P, EX.O})}