fun oldest (dates: (int*int*int) list) = if null dates then NONE else let val ans = oldest(tl dates) in if isSome ans andalso is_older(valOf ans, hd dates) then ans else SOME (hd dates) end
a function compares all dates(like 2018,2,28) in the list, and get the oldest date
2.1m questions
2.1m answers
60 comments
57.0k users