From 8c7b8ebc8d88a146f416dde12e9901772568152f Mon Sep 17 00:00:00 2001 From: Ummon Date: Wed, 6 Dec 2017 10:11:47 +0100 Subject: [PATCH] Remove useless sh*t --- AdventOfCode2017/Day6.fs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/AdventOfCode2017/Day6.fs b/AdventOfCode2017/Day6.fs index 867d408..113c47d 100644 --- a/AdventOfCode2017/Day6.fs +++ b/AdventOfCode2017/Day6.fs @@ -1,9 +1,6 @@ module AdventOfCode2017.Day6 open System -open System.Linq - -type Blocks = int[] let parseInput (str : string) : int[] = str.Split ([| '\r'; '\t'; ' ' |], StringSplitOptions.RemoveEmptyEntries) |> Array.map int @@ -22,8 +19,8 @@ let inline (|=|) (a1 : 'a[]) (a2 : 'a[]) : bool = result (i + 1) result 0 -let nbRedistribution (blocks : Blocks) = - let rec next (previous : Blocks list) = +let nbRedistribution (blocks : int[]) = + let rec next (previous : int[] list) = let blocks = List.head previous |> Array.copy let i, max = blocks |> Array.indexed |> Array.maxBy snd blocks.[i] <- 0 -- 2.45.2