Closest To Origin Assignment
Revision as of 05:24, 14 February 2022 by Dennis.cosgrove (talk | contribs) (→is_strictly_ascending)
Code to Implement
file: | src/main/sml/warmup_closest_to_origin/closest_to_origin.sml | |
functions: | closest_to_origin |
closest_to_origin
Write a function
fun closest_to_origin(xys : (int*int) list) : (int*int) option
which optionally returns closest point to the origin, if it exists.
Test
file: | unit_test_closest_to_origin.sml | |
source folder: | src/test/sml/warmup_closest_to_origin |