{"content":{"id":75,"title":"SICP Solutions - 1.2","body":"\u003cbr\u003e\r\n\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e Translate the following expression into prefix form:\u003c/p\u003e\r\n\u003cbr\u003e\r\n\u003cimg src=\"/uploads/36.gif\" class=\"card-image\"\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e\u003c/p\u003e\r\n\u003cpre\u003e\u003ccode class=\"lisp\"\u003e(/ (+ 5 4 (- 2 3 (+ 6 4/5)))\r\n (* 3 (- 6 2) (- 2 7)))\u003c/code\u003e\u003c/pre\u003e\r\n\u003cbr\u003e\r\n\u003cp\u003e(gives \u003ci\u003e-1/50\u003c/i\u003e on \u003ca href=\"https://www.gnu.org/software/guile/\" target=\"_blank\"\u003eGuile\u003c/a\u003e and \u003ci\u003e-0.02\u003c/i\u003e on \u003ca href=\"https://www.call-cc.org/\" target=\"_blank\"\u003eChicken\u003c/a\u003e)\u003c/p\u003e","publication_date":"2018-06-18T00:00:00.000Z","created_at":"2018-06-08T23:45:15.000Z","updated_at":"2018-09-28T03:20:10.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=sicp\"\u003esicp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=scheme\"\u003escheme\u003c/a\u003e"}

SICP Solutions - 1.2


Q: Translate the following expression into prefix form:


A:

(/ (+ 5 4 (- 2 3 (+ 6 4/5)))
   (* 3 (- 6 2) (- 2 7)))

(gives -1/50 on Guile and -0.02 on Chicken)