{"id":192,"date":"2004-05-27T03:10:47","date_gmt":"2004-05-27T01:10:47","guid":{"rendered":"http:\/\/blogs.bl0rg.net\/neingeist-neu\/2004\/05\/27\/lisp\/"},"modified":"2006-10-10T03:48:14","modified_gmt":"2006-10-10T01:48:14","slug":"lisp","status":"publish","type":"post","link":"https:\/\/blogs.bl0rg.net\/neingeist\/2004\/05\/27\/lisp\/","title":{"rendered":"Lisp"},"content":{"rendered":"<p>I deciced to give <a href=\"http:\/\/en.wikipedia.org\/wiki\/Lisp_programming_language\">Lisp<\/a> a try and currently I&#8217;m struggling with a lot of parentheses and a lot of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Lambda_calculus\">lambdas<\/a>. Anyway, for the first day (or night) I&#8217;m really proud of this beauty: \ud83d\ude42<\/p>\n<pre>;; Problem 3-9 (without tolerance)\r\n(<a href=\"http:\/\/www.lisp.org\/HyperSpec\/Body\/mac_defun.html\">defun<\/a> rightp (a b c)\r\n(<a href=\"http:\/\/www.lisp.org\/HyperSpec\/Body\/speope_letcm_letst.html\">let<\/a> ((longest-side-square (expt (car (sort (list a b c) '&gt;)) 2))\r\n(shorter-side-square-sum (apply '+ (mapcar (lambda (x) (expt x 2))\r\n(cdr (sort (list a b c) '&gt;))))))\r\n(<a href=\"http:\/\/www.lisp.org\/HyperSpec\/Body\/fun_eqcm_sleq__lteqcm_gteq.html\">=<\/a> longest-side-square shorter-side-square-sum)))<\/pre>\n<p>Thanks to Manuel of the <a href=\"http:\/\/bknr.net\">BKNR<\/a> project for their <a href=\"http:\/\/bknr.net\/source\/bknr\/htmlize\/\">htmlize.lisp<\/a> code!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I deciced to give Lisp a try and currently I&#8217;m struggling with a lot of parentheses and a lot of lambdas. Anyway, for the first day (or night) I&#8217;m really proud of this beauty: \ud83d\ude42 ;; Problem 3-9 (without tolerance) (defun rightp (a b c) (let ((longest-side-square (expt (car (sort (list a b c) &#8216;&gt;)) [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[14],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.bl0rg.net\/neingeist\/wp-json\/wp\/v2\/posts\/192"}],"collection":[{"href":"https:\/\/blogs.bl0rg.net\/neingeist\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.bl0rg.net\/neingeist\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.bl0rg.net\/neingeist\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.bl0rg.net\/neingeist\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":0,"href":"https:\/\/blogs.bl0rg.net\/neingeist\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.bl0rg.net\/neingeist\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.bl0rg.net\/neingeist\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.bl0rg.net\/neingeist\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}