Macros: Difficult
code writing
Manhattan distance between two points is defined as the sum of the vertical and horizontal distances between the two points. More formally, the manhattan distance between points (x1, y1) and (x2, y2) is |x1 - x2| + |y1 - y2|. Write a macro that calculates the manhattan distance between two points p1 and p2 which are represented as two element lists.
> (define p1 '(1 2))
> (define p2 '(3 4))
> (manhattan-dist p1 p2)
4
(define-macro (manhattan-dist p1 p2)
________
)