<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">The problem is 27.5.4 can be found at<br><a href="http://htdp.org/2003-09-26/Book/curriculum-Z-H-34.html#node_sec_27.5">http://htdp.org/2003-09-26/Book/curriculum-Z-H-34.html#node_sec_27.5</a><br><br>I am still on the beginning of this extended exercise and I am entirely lost. I know how it works but can't get anything even remotely close. I was able to create subtract from 27.5.2, but triangulate eludes me after a few days of thinking. My first thought is to make something that takes either a (listof(listof numbers)), or 3 (listof numbers), and have it output the first part of triangulation.<br><br>So for the lolon of '((2 2 3 10)(2 5 12 31)(4 1 -2 1)) I want to produce an answer of<br>'((2 2 3 10)(3 9 21)(-3 -8 -19))<br><br>I feel like applying subtract to first and second in lolon produces (3 9 21), but I am not sure how to make it continue on the rest of
the list. I tried (subtract2(subtract(first lolon)(second lolon))), which really doesn't work and it seems obvious to me just from glancing at it.<br><br>I am thinking back to how I did merge sort, create a function that merges 2 lists, apply it to the first and second items in a lolon, then recursively apply it to the rest of the list.<br><br>In subtract2 my final goal is to apply subtract to the first and second item, then recursively apply it to first and rest of the list, but I can't figure out how to get this. <br><br>I know the real question has to do with applying this over and over to any lists of equal length, until you drop the first position to 0, and maybe I am heading in the wrong direction, but it seems easier to break it into smaller problems. I really want to complete this problem before moving on with the book but I can't find anything that works, everything I think of causes infinite loops and freezes my computer for 10
minutes.<br></td></tr></table><br>