Skip to content

maorleger/elm-infinite-zipper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-infinite-zipper

An infinite zipper list that will always focus on an element. Once a zipper is initialized, you can move backwards and forwards and the zipper will circle around once it passes an end focus.

When the cursor is at the end of the list, right will return focus to the front of the list.
When the cursor is at the beginning of the list, previous will return focus to the end of the list.

As an example:

  InfiniteZipper.fromListWithDefault 4 [1, 2, 3]  
    |> InfiniteZipper.next  
    |> InfiniteZipper.next  
    |> InfiniteZipper.next  
    |> InfiniteZipper.current  
    -- 1  

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages