Problem 19 Solution

rotate : Int -> List a -> List a
rotate rot list =
    let
        r =
            rot % (List.length list)
    in
        List.drop r list ++ List.take r list

Back to problem

results matching ""

    No results matching ""