{"id":17,"date":"2007-07-26T22:33:30","date_gmt":"2007-07-27T05:33:30","guid":{"rendered":"http:\/\/www.elbeno.com\/haskell_soe_blog\/?p=17"},"modified":"2008-01-07T21:52:29","modified_gmt":"2008-01-08T05:52:29","slug":"exercise-53","status":"publish","type":"post","link":"https:\/\/www.elbeno.com\/haskell_soe_blog\/?p=17","title":{"rendered":"Exercise 5.3"},"content":{"rendered":"<p>Note: Anonymous functions are not introduced until chapter 9! But they are an easy way to solve problems like this.<\/p>\n<pre lang=\"haskell\">mylength :: [a] -> Int\r\nmylength xs = foldl (\\x _ -> x + 1) 0 xs<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Note: Anonymous functions are not introduced until chapter 9! But they are an easy way to solve problems like this. mylength :: [a] -> Int mylength xs = foldl (\\x _ -> x + 1) 0 xs<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.elbeno.com\/haskell_soe_blog\/index.php?rest_route=\/wp\/v2\/posts\/17"}],"collection":[{"href":"https:\/\/www.elbeno.com\/haskell_soe_blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elbeno.com\/haskell_soe_blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/haskell_soe_blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/haskell_soe_blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17"}],"version-history":[{"count":0,"href":"https:\/\/www.elbeno.com\/haskell_soe_blog\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.elbeno.com\/haskell_soe_blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elbeno.com\/haskell_soe_blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elbeno.com\/haskell_soe_blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}