interval.scm: add some apis