lue-bird/elm-linear-direction/7.0.0

NOTE: the latest version is 11.2.0

Linear

Up or Down a structure.

= Up
| Down

Either

  • Up towards the beginning where indexes are getting bigger
  • Down towards the beginning where indexes are getting smaller

alter

The other Direction: Down ⇆ Up

transform

The direction's lowercase name

index

= IndexIntNegative
| IndexIntBeyondElements

Locating an element at a given index Int fails if its

  • <= -1
  • >= the structure's length