Write an SML function called sumdiff
that returns true if and only if the
list passed in its argument contains at least one sum triplet or difference
triplet.
(* sumdiff : int list -> bool sumdiff zs = true iff zs contains at least one sum or difference triplet *)Write declarative head comments to any auxiliary function you wish to define.
sumdiff [] = false; sumdiff [1,1] = false; sumdiff [1,2,4] = false; sumdiff [1,2,~1] = true; sumdiff [1,2,3,~1] = true; sumdiff [1,2,3,~1,2] = true; sumdiff [1,2,4,~3,4] = false;