- Embed a list of polygons into your program. The list must have a minimum of 5 polygons, with exactly 2 triangles in the list.
- Write a function named poly_sum(polygon) that returns the perimeter of the given polygon. So for example the rectangle [2,4,2,4] as input to this function would return 12, which is the sum of the 4 sides. Note that this function must be constructed only using the higher order functional elements outlined in the book. Use reduce to generate a sum of those sides.
- Use the standard filter function to generate a list of only the triangles in the original polygon list.
- Use the standard map function to compute the perimeters of the triangles from the previous step using poly_sum as the transformer.
PLACE YOUR ORDER NOW