summaryrefslogtreecommitdiffstats
path: root/W.hs
diff options
context:
space:
mode:
Diffstat (limited to 'W.hs')
-rw-r--r--W.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/W.hs b/W.hs
index b440c21..d46dc7a 100644
--- a/W.hs
+++ b/W.hs
@@ -91,6 +91,7 @@ forever a = a >> forever a
-- rotate (-1)
-- [4,5,6,7,8,1,2,3]
--
+rotate :: Int -> [a] -> [a]
rotate n xs = take l . drop offset . cycle $ xs
where
l = length xs