-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | This package provides functions for relocate an item within a list. -- -- Please see the README on GitHub at -- https://github.com/fesanmar/scroll-list#readme @package scroll-list @version 1.0.0.1 -- | This module provides functions for relocate an item within a list. module Data.List.Scroll -- | The up function moves an element n positions to the -- beginning of a list. If the index provided is out of range, the list -- is returned without any modification. On the other hand, extra steps -- will be ignored. -- -- Some examples are given below: -- --
--   >>> up 2 2 ["one", "two", "three"]
--   ["three", "one", "two"]
--   
-- --
--   >>> up 4 1 ["one", "two", "three"]
--   ["one", "two", "three"]
--   
-- --
--   >>> up 2 3 ["one", "two", "three"]
--   ["three", "one", "two"]
--   
up :: Int -> Int -> [a] -> [a] -- | The down function moves an element n positions to the -- end of a list. If the index provided is out of range, the list is -- returned without any modification. On the other hand, extra steps will -- be ignored. -- -- Some examples are given below: -- --
--   >>> down 0 1 ["one", "two", "three"]
--   ["two", "one", "three"]
--   
-- --
--   >>> down 4 1 ["one", "two", "three"]
--   ["one", "two", "three"]
--   
-- --
--   >>> down 0 4 ["one", "two", "three"]
--   ["two", "three", "one"]
--   
down :: Int -> Int -> [a] -> [a]