clojure-hackos.polygonal-area

Solution to the Compute the Area of a Polygon challenge See: https://www.hackerrank.com/challenges/lambda-march-compute-the-area-of-a-polygon

area

(area coords)

Computes the area of a figure with vertices at the given sequence of co-ordinates

try-me

(try-me)

Demonstrates area by reading in the following inputs:

  • the number of vertices in the figure
  • the x-y co-ordinates of each vertex, each pair on a single line