This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
A circular buffer (infinite cyclic list)
version 1.0.0
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.1.0
Committed At 2018-06-28 16:21:37 UTC
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1

Modules

README

lovasoa/elm-rolling-list

Circular buffer

A Rolling List is a list with a finite number of elements that can be inifintely iterated over.

    >>> import RollingList
    >>> rl = RollingList.fromList [1,2]
    >>> RollingList.current rl
    Just 1
    >>> rolled = RollingList.roll rl
    >>> RollingList.current rolled
    Just 2
    >>> rolledTwice = RollingList.roll rolled
    >>> RollingList.current rolledTwice
    Just 1

test

Just run npm install && npm test