{"id":3808,"date":"2024-09-07T18:26:45","date_gmt":"2024-09-07T18:26:45","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=3808"},"modified":"2024-09-07T18:26:46","modified_gmt":"2024-09-07T18:26:46","slug":"delete-from-list","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/07\/delete-from-list\/","title":{"rendered":"Delete from List"},"content":{"rendered":"\n<p id=\"Arti00011932\">To delete an element X from a list L, one of the three cases may arise.<\/p>\n\n\n\n<ul class=\"wp-block-list\" id=\"Arti00011933\">\n<li>If X is the only element, then after deleting it, an empty list is returned.<\/li>\n\n\n\n<li>If X is head of L, then the Tail part of the list will be returned.<\/li>\n\n\n\n<li>If X is an element of the Tail of the list then recursively delete from the tail part.<\/li>\n<\/ul>\n\n\n\n<p id=\"Arti00011937\">We need to add the following instructions for the predicate list_delete in the kb5.pl and run the commands as shown in figure.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9789357053778\/files\/images\/img_p580.png\" alt=\"images\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9789357053778\/files\/images\/img_p580-2.png\" alt=\"images\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>To delete an element X from a list L, one of the three cases may arise. We need to add the following instructions for the predicate list_delete in the kb5.pl and run the commands as shown in figure.<\/p>\n","protected":false},"author":1,"featured_media":3341,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[464],"tags":[],"class_list":["post-3808","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming-language-prolog"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/08\/programming.png","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=3808"}],"version-history":[{"count":1,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3808\/revisions"}],"predecessor-version":[{"id":3809,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/3808\/revisions\/3809"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/3341"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=3808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=3808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=3808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}