-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
76 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
288 | ||
- | ||
71503 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
1084752 | ||
- | ||
28228952 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
namespace Day06 | ||
|
||
open Microsoft.FSharp.Core.Operators.Checked | ||
|
||
[<AutoOpen>] | ||
module Expose = | ||
open System.IO | ||
|
||
let readInput = File.ReadAllText >> parseInput | ||
let part1 = List.map beatRecordCount >> List.map uint >> List.reduce (*) | ||
let readInput = File.ReadAllText | ||
let part1 = parseInputV1 >> List.map beatRecordCount >> List.reduce (*) | ||
let part2 = parseInputV2 >> beatRecordCount | ||
|
||
module Program = | ||
[<EntryPoint>] | ||
let main args = | ||
let input = readInput args[0] | ||
|
||
part1 input |> printfn "Part 1: %i" | ||
part2 input |> printfn "Part 2: %i" | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
namespace Day06 | ||
|
||
type Base = uint16 | ||
type Base = uint64 | ||
type Record = { time: Base; distance: Base } | ||
|
||
[<RequireQualifiedAccess>] | ||
module Base = | ||
let inline convertTo x = uint64 x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters