{"id":176,"date":"2024-09-30T10:38:06","date_gmt":"2024-09-30T09:38:06","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=176"},"modified":"2024-09-30T10:38:06","modified_gmt":"2024-09-30T09:38:06","slug":"mwnci-cumulative-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-cumulative-function\/","title":{"rendered":"Mwnci cumulative() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>cumulative(<i><b>array<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p>The <i>cumulative()<\/i> function returns an array by increasing by one element after another, and including all the amounts that have been added before.<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>include(\"math\")\r\narray=[1,2,3,4,5,6]\r\narray=cumulative(array)\r\nprintln(array)\r\n\r\n[1,3,6,10,15,21]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax cumulative(array) Description The cumulative() function returns an array by increasing by one element after another, and including all the amounts that have been added before. Example include(&#8220;math&#8221;) array=[1,2,3,4,5,6] array=cumulative(array) println(array) [1,3,6,10,15,21]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-176","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=176"}],"version-history":[{"count":1,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/176\/revisions"}],"predecessor-version":[{"id":177,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/176\/revisions\/177"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}