{"id":25969,"date":"2019-12-23T15:37:23","date_gmt":"2019-12-23T14:37:23","guid":{"rendered":"http:\/\/www.valcon.it\/fun\/?p=86"},"modified":"2024-07-17T20:18:50","modified_gmt":"2024-07-17T18:18:50","slug":"h-fattoriale","status":"publish","type":"post","link":"https:\/\/www.valcon.it\/pp\/h-fattoriale\/","title":{"rendered":"Fattoriale"},"content":{"rendered":"\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/www.valcon.it\/pp\/haskell\/\">Haskell<\/a><\/div>\n<\/div>\n\n\n<p>Con <strong>product<\/strong><\/p>\n<pre class=\"\">fattoriale n = product [1..n]<\/pre>\n<p>Con la <em>ricorsione<\/em><\/p>\n<pre class=\"\">fattoriale 0 = 1\r\nfattoriale n = n*fattoriale (n-1)<\/pre>\n<p>Con <strong>if &#8230; then &#8230; else &#8230;<\/strong><\/p>\n<pre class=\"\">fattoriale n = if n == 0 then 1 else n*fattoriale (n-1)\r\n\r\nfattoriale n = if n == 0 then 1 \r\n                         else n*fattoriale (n-1)\r\n\r\nfattoriale n = \r\n    if n == 0 then 1 \r\n              else n*fattoriale (n-1)\r\n\r\nfattoriale n = \r\n    if n == 0 \r\n        then 1 \r\n        else n*fattoriale (n-1)<\/pre>\n<p>Con la <em>griglia<\/em><\/p>\n<pre class=\"\">fattoriale n\r\n    | n == 0    = 1\r\n    | otherwise = n*fattoriale (n-1)<\/pre>","protected":false},"excerpt":{"rendered":"<p>Con product fattoriale n = product [1..n] Con la ricorsione fattoriale 0 = 1 fattoriale n = n*fattoriale (n-1) Con if &#8230; then &#8230; else &#8230; fattoriale n = if n == 0 then 1 else n*fattoriale (n-1) fattoriale n = if n == 0 then 1 else n*fattoriale (n-1) fattoriale n = if n &#8230; <a title=\"Fattoriale\" class=\"read-more\" href=\"https:\/\/www.valcon.it\/pp\/h-fattoriale\/\" aria-label=\"Per saperne di pi\u00f9 su Fattoriale\">Leggi tutto<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104],"tags":[],"class_list":["post-25969","post","type-post","status-publish","format-standard","hentry","category-haskell"],"_links":{"self":[{"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/posts\/25969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/comments?post=25969"}],"version-history":[{"count":2,"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/posts\/25969\/revisions"}],"predecessor-version":[{"id":44535,"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/posts\/25969\/revisions\/44535"}],"wp:attachment":[{"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/media?parent=25969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/categories?post=25969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.valcon.it\/pp\/wp-json\/wp\/v2\/tags?post=25969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}