This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
A List that automatically slides
version 2.0.2
license MIT
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 2.0.2
Committed At 2018-07-26 19:08:08 UTC
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1




Build Status

This package gives you a sliding list. You can specify that you wish to have a list that will have at most n items. For instance, maybe you want a list that can have at most 3 items. The moment you add a 4th item to this list, the oldest item will be dropped, thus ensuring you will only have a maximum of 3 items.

The maximum number of items in a list must be greater than zero, therefore you need to use the positiveInt function, which will return a Just if this criteria was met.

Feel free to take a look into the tests, to get a better understanding of this module.

A lot of the public interface of this module was inspired by Elm's core List module.

Feedback is always greatly appreciated 🙂