Add a load-more button to item list

This commit is contained in:
Eike Kettner
2020-06-06 02:08:20 +02:00
parent e5b90eff34
commit b150269528
9 changed files with 251 additions and 16 deletions

View File

@ -1,5 +1,6 @@
module Util.List exposing
( distinct
, dropRight
, find
, findIndexed
, findNext
@ -80,3 +81,10 @@ findNext pred list =
|> Maybe.map Tuple.second
|> Maybe.map (\i -> i + 1)
|> Maybe.andThen (get list)
dropRight : Int -> List a -> List a
dropRight n list =
List.reverse list
|> List.drop n
|> List.reverse