lue-bird/elm-linear-direction - version: 11.2.0

for more information visit the package's GitHub page

Package contains the following modules:

linear direction

How about taking the Direction as an argument!

import Linear exposing (Direction(..))
import List.Linear
import Array exposing (Array)
import Array.Linear

[ 'l', 'i', 'v', 'e' ]
    |> List.Linear.foldFrom "" Up String.cons
--> "evil"

[ 'l', 'i', 'v', 'e' ]
    |> List.Linear.foldFrom "" Down String.cons
--> "live"

Array.fromList [ 'e', 'v', 'i', 'l' ]
    |> Array.Linear.element ( Down, 0 )
--> Just 'l'

where linear direction is already being used

suggestions?

contribute