From 30078e766663978e926e1fc6cb3a61fe5af14bcc Mon Sep 17 00:00:00 2001 From: Marcel Otto Date: Wed, 27 Oct 2021 11:00:27 +0200 Subject: [PATCH] Improve documentation of RDF.Graph.update/4 --- lib/rdf/graph.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rdf/graph.ex b/lib/rdf/graph.ex index a5f5504..b166c1c 100644 --- a/lib/rdf/graph.ex +++ b/lib/rdf/graph.ex @@ -448,8 +448,9 @@ defmodule RDF.Graph do If `subject` is present in `graph` with `description` as description, `fun` is invoked with argument `description` and its result is used as the new description of `subject`. If `subject` is not present in `graph`, - `initial` is inserted as the description of `subject`. The initial value will - not be passed through the update function. + `initial` is inserted as the description of `subject`. If no `initial` value is + given, the `graph` remains unchanged. If `nil` is returned by `fun`, the + respective description will be removed from `graph`. The initial value and the returned objects by the update function will be tried te coerced to proper RDF descriptions before added. If the initial or returned