This file contains hidden or 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
many(find(mul)) | |
mul = "mul(" & int -> A & "," & int -> B & ")" $ Num.Mul(A, B) |
This file contains hidden or 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
many_sep(safe_report | unsafe_report, nl) | |
safe_report = | |
int -> First & | |
increasing_report(First) | | |
decreasing_report(First) | |
increasing_report(Prev) = | |
space & int -> Next ? | |
const(Increasing(Prev, Next)) & increasing_report(Next) : |
This file contains hidden or 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
array_sep(tuple2_sep(int, spaces, int), nl) -> Rows $ ( | |
TransposeTable(Rows) -> [List1, List2] & | |
TransposeTable([Sort(List1), Sort(List2)]) -> SortedPairs & | |
Map(SortedPairs, Abs) -> Distances & | |
MergeArray(Distances) | |
) | |
Sort(Array) = | |
Array -> [] | ( | |
Array -> [X, ...Xs] & |
This file contains hidden or 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
#lang racket | |
(print-as-expression #f) | |
(provide (all-defined-out)) | |
(require racket/block) | |
;================; | |
; Internal Defns ; | |
;================; | |
; create a stack. | |
(define _stack empty) |
This file contains hidden or 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
# R G B G | |
# ------- | |
# Y R P B Correct #: 0, Right Color Wrong Place #: 2, Incorrect #: 2 | |
# R Y R G Correct #: 2, Right Color Wrong Place #: 0, Incorrect #: 2 | |
# | |
# | |
# Position 1: R <enter> | |
# Position 2: R <enter> | |
# | |
# > R Y R G |
This file contains hidden or 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
app "advent-2023-roc-day14" | |
packages { | |
cli: "https://github.com/roc-lang/basic-cli/releases/download/0.7.0/bkGby8jb0tmZYsy2hg1E_B2QrCgcSTxdUlHtETwm5m4.tar.br", | |
parser: "https://github.com/lukewilliamboswell/roc-parser/releases/download/0.3.0/-e3ebWWmlFPfe9fYrr2z1urfslzygbtQQsl69iH1qzQ.tar.br", | |
array2d: "https://github.com/mulias/roc-array2d/releases/download/v0.1.0/ssMT0bDIv-qE7d_yNUyCByGQHvpNkQJZsGUS6xEFsIY.tar.br", | |
} | |
imports [ | |
cli.Stdout, | |
array2d.Array2D.{ Array2D, Index, Shape }, | |
parser.Core.{ Parser, between, sepBy1, chompWhile, const, map, oneOf, buildPrimitiveParser, parsePartial, fail }, |
This file contains hidden or 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
app "advent-2023-roc-day13" | |
packages { | |
cli: "https://github.com/roc-lang/basic-cli/releases/download/0.7.0/bkGby8jb0tmZYsy2hg1E_B2QrCgcSTxdUlHtETwm5m4.tar.br", | |
parser: "https://github.com/lukewilliamboswell/roc-parser/releases/download/0.3.0/-e3ebWWmlFPfe9fYrr2z1urfslzygbtQQsl69iH1qzQ.tar.br", | |
array2d: "https://github.com/mulias/roc-array2d/releases/download/v0.1.0/ssMT0bDIv-qE7d_yNUyCByGQHvpNkQJZsGUS6xEFsIY.tar.br", | |
} | |
imports [ | |
cli.Stdout, | |
array2d.Array2D.{ Array2D, Index, Shape }, | |
parser.Core.{ Parser, between, sepBy1, chompWhile, const, map, oneOf, buildPrimitiveParser, parsePartial, fail }, |
This file contains hidden or 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
app "day03" | |
packages { | |
cli: "https://github.com/roc-lang/basic-cli/releases/download/0.7.0/bkGby8jb0tmZYsy2hg1E_B2QrCgcSTxdUlHtETwm5m4.tar.br", | |
array2d: "https://github.com/mulias/roc-array2d/releases/download/v0.1.0/ssMT0bDIv-qE7d_yNUyCByGQHvpNkQJZsGUS6xEFsIY.tar.br", | |
} | |
imports [ | |
cli.Stdout, | |
array2d.Array2D.{ Array2D }, | |
"example.txt" as exampleInput : Str, | |
"input.txt" as puzzleInput : Str, |
This file contains hidden or 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
app "day03" | |
packages { | |
cli: "https://github.com/roc-lang/basic-cli/releases/download/0.7.0/bkGby8jb0tmZYsy2hg1E_B2QrCgcSTxdUlHtETwm5m4.tar.br", | |
array2d: "https://github.com/mulias/roc-array2d/releases/download/v0.1.0/ssMT0bDIv-qE7d_yNUyCByGQHvpNkQJZsGUS6xEFsIY.tar.br", | |
} | |
imports [ | |
cli.Stdout, | |
array2d.Array2D.{ Array2D }, | |
"example.txt" as exampleInput : Str, | |
"input.txt" as puzzleInput : Str, |
This file contains hidden or 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
app "day03" | |
packages { | |
cli: "https://github.com/roc-lang/basic-cli/releases/download/0.7.0/bkGby8jb0tmZYsy2hg1E_B2QrCgcSTxdUlHtETwm5m4.tar.br", | |
array2d: "https://github.com/mulias/roc-array2d/releases/download/v0.1.0/ssMT0bDIv-qE7d_yNUyCByGQHvpNkQJZsGUS6xEFsIY.tar.br", | |
} | |
imports [ | |
cli.Stdout, | |
array2d.Array2D.{ Array2D }, | |
"example.txt" as exampleInput : Str, | |
"input.txt" as puzzleInput : Str, |
NewerOlder