A Rolling List is a list with a finite number of elements that can be inifintely iterated over.
import RollingList
let
rl = RollingList.fromList [1,2]
in
RollingList.current rl
--> Just 1let
rl = RollingList.fromList [1,2]
rolled = RollingList.roll rl
in
RollingList.current rolled
--> Just 2let
rl = RollingList.fromList [1,2]
rolled = RollingList.roll rl
rolledTwice = RollingList.roll rolled
in
RollingList.current rolledTwice
--> Just 1Just run npm install && npm test