GitXplorerGitXplorer
y

advent-of-code-2021-rescript

public
3 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
0f67ffd9d98ef3e50d4f026e686173007c78ad87

day 24

yyangdanny97 committed 3 years ago
Unverified
bcd455c26f3fcda4772fe1d283e88f3758482efb

Merge branch 'main' of https://github.com/yangdanny97/advent-of-code

yyangdanny97 committed 3 years ago
Unverified
7cbc09ea45a3e4cf6dbff545c4f949fad12f61a2

25 p1

yyangdanny97 committed 3 years ago
Verified
09b2ab220aea806e7d46914276d1bd50bba9bb8d

Update README.md

yyangdanny97 committed 3 years ago
Unverified
50560d966099de45766842796be60ae445de3e41

day 23

yyangdanny97 committed 3 years ago
Unverified
70ad760159ed2d19991f2ed369e6e34fd4f6a4ae

day 23 part 1

yyangdanny97 committed 3 years ago

README

The README file for this repository.

advent-of-code

Advent of code 2021

Some fun/practice with ReScript. The solutions are mostly in a functional style using immutable data structures where feasible, although mutability is leveraged in some places for performance reasons.

The code file for each day also contains the example input provided on the AOC website, and running the file for a particular day will print the answers to part 1 and part 2 in your console. The entry points for each part are functions named part1 and part2.

Inputs are mostly represented as array literals because 1) I'm not interested in parsing the raw input text and 2) literals for large lists compile to something nasty, so using an array literal and calling List.fromArray makes the most sense.

Setup:

npm install

To build:

npm run re:build

To run the code for a particular day (day 1 for example):

node src/day1.bs.js