I am learning Clojure, and I need a push in the right direction with this problem I came up with.
I have a sequence of events. Each event includes a 'date'.
(def events
[
[1509 :marry "Catherine of Aragon"]
[1527 :unmarry "Catherine of Aragon"]
[1533 :marry "Anne Boleyn"]
[1536 :unmarry "Anne Boleyn"]
[1536 :marry "Jane Seymour"]
[1537 :unmarry "Jane Seymour"]
[1540 :marry "Anne of Cleves"]
[1540 :unmarry "Anne of Cleves"]
[1540 :marry "Catherine Howard"]
[1542 :unmarry "Catherine Howard"]
[1543 :marry "Catherine Parr"]])
I want to convert this into a lazy timeline, i.e. a sequence containing one vector per year. Starting with the year of the first event, and continuing to infinity.
[[[:marry "Catherine of Aragon"]] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [[:unmarry "Catherine of Aragon"]] [] [] [] [] [] [[:marry "Ane Boleyn"]] [] [] [[:unmarry "Anne Boleyn"] [:marry "Jayne Seymour"]] ...]