所以基本上我已经收到了一个关于这种语言的问题,我从昨晚开始就一直在阅读文档。我什么都不知道,所以我想我会试试这个网站。
基本上这里的问题是:
我已经获得了几种日历日期结构和方案间隔:
(define-struct cal (month day))
(define-struct interval (start end))
但是,我被要求检查 2 个不同的间隔是否相互重叠。一个例子:
If I have dates March 12th - March 14th in my first interval,
but in my second interval I have the dates March 13th - March 2th
(overlap? int1 int2) would return true.
However if I have dates March 12th - March 14th in my first interval,
but I have March 15th - March 18th in my second interval
(overlap? int1 int2) would return false.
我不知道从哪里开始。如果有人可以为我解决这个问题,以便我可以完成这个问题,我将不胜感激。非常感谢!