Move scratch/brilliant into //assessments

Where it belongs...
This commit is contained in:
William Carroll 2020-08-18 12:13:00 +01:00
parent 0c71fc9d1d
commit 33890d8a8b
10 changed files with 0 additions and 0 deletions

View file

@ -1,13 +0,0 @@
--------------------------------------------------------------------------------
module Utils where
--------------------------------------------------------------------------------
import Data.Function ((&))
--------------------------------------------------------------------------------
(|>) :: a -> (a -> b) -> b
(|>) = (&)
-- | Rotate `xs` as a cycle `n` times.
rotate :: Int -> [a] -> [a]
rotate n xs = take size . drop (n `mod` size) . cycle $ xs
where size = length xs