ninetynine-1.3.0: Ninety-Nine Haskell Problems
CopyrightCopyright (C) 2021 Yoo Chung
LicenseGPL-3.0-or-later
Maintainerdev@chungyc.org
Safe HaskellSafe-Inferred
LanguageGHC2021

Problems.P19

Description

Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P19.

Synopsis

Documentation

rotate :: [a] -> Int -> [a] Source #

Rotate a list n places to the left.

Examples

>>> rotate "abcdefgh" 3
"defghabc"
>>> rotate "abcdefgh" (-2)
"ghabcdef"