Added UpdateList example with negative indexes ldpatch
authorAlexandre Bertails <alexandre@bertails.org>
Sun, 14 Dec 2014 11:27:21 -0500
branchldpatch
changeset 925 3f6caeb73213
parent 924 25c11f178ac4
child 926 e0605a41e1b3
Added UpdateList example with negative indexes
ldpatch.html
--- a/ldpatch.html	Sun Dec 14 11:15:24 2014 -0500
+++ b/ldpatch.html	Sun Dec 14 11:27:21 2014 -0500
@@ -424,6 +424,23 @@
           </pre>
 
 
+          <h3 id="replace-elements-from-end-of-list">How to replace the n last elements</h3>
+
+          <p>
+              This example shows how to replace the last <code>3</code> elements of the provided collection:
+          </p>
+
+          <pre class='example'>
+UpdateList &lt;#&gt; &lt;http://example.org/vocab#preferredLanguages&gt; -3.. ( "en" "fr" ) .
+          </pre>
+
+          <p>Output graph:</p>
+          
+          <pre class='example'>
+&lt;#&gt; &lt;http://example.org/vocab#preferredLanguages&gt; ( "lorem" "ipsum" "en" "fr" ).
+          </pre>
+
+
           <h3 id="remove-elements">How to remove elements</h3>
 
           <p>