Implemented Timetable

Translated from Haskell from Simon Marlow's book.