diff options
author | Tomasz Chojnacki <tomaszchojnacki2001@gmail.com> | 2022-12-10 13:26:15 +0100 |
---|---|---|
committer | Tomasz Chojnacki <tomaszchojnacki2001@gmail.com> | 2022-12-10 13:26:15 +0100 |
commit | 520a01ed88fafb165ecb3eaa9fd3e39db0431722 (patch) | |
tree | e4ec65b5b1dd5c51b5d22810b7c79ff2f5c6381c /aoc-2022-dotnet/Common/Util.fs | |
parent | 3c444c7e3300ea7df5dcc8811e216ff552136fa9 (diff) | |
download | gleam_aoc2020-520a01ed88fafb165ecb3eaa9fd3e39db0431722.tar.gz gleam_aoc2020-520a01ed88fafb165ecb3eaa9fd3e39db0431722.zip |
Finish day 10
Diffstat (limited to 'aoc-2022-dotnet/Common/Util.fs')
-rw-r--r-- | aoc-2022-dotnet/Common/Util.fs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/aoc-2022-dotnet/Common/Util.fs b/aoc-2022-dotnet/Common/Util.fs index a9f3a1e..6393aad 100644 --- a/aoc-2022-dotnet/Common/Util.fs +++ b/aoc-2022-dotnet/Common/Util.fs @@ -25,6 +25,11 @@ module Util = | [ x; y ] -> x, y | _ -> failwith "Invalid string format!" + let matrixToString m = + m + |> Seq.map (Seq.map string >> String.concat "") + |> String.concat "\n" + let topN n xs = let rec insertSorted x = function |