Hazel Levine 7 months ago
parent
commit
b77a80f49d
Signed by: hazel GPG Key ID: 1884029A28789A62
  1. 3
      day14/dock/parse.rkt
  2. 5
      day14/dock/part1.rkt
  3. 3
      day14/dock/part2.rkt

3
day14/dock/parse.rkt

@ -1,6 +1,5 @@
#lang racket
(require (only-in rosette
bv concat)
(require bv
data/applicative data/monad
megaparsack megaparsack/parser-tools/lex
parser-tools/lex (prefix-in : parser-tools/lex-sre))

5
day14/dock/part1.rkt

@ -1,7 +1,6 @@
#lang racket
(require "parse.rkt"
(only-in rosette
bv bvand bvor bitvector->natural)
bv
syntax/parse/define
syntax/strip-context)
(provide (rename-out [dock-module-begin #%module-begin])
@ -22,9 +21,9 @@
(begin OP ...
(displayln (foldl + 0 (hash-values memory)))))
(define memory (make-hasheq))
(define current-ormask (make-parameter #f))
(define current-andmask (make-parameter #f))
(define memory (make-hasheq))
(define (mask mor mand)
(current-ormask mor)

3
day14/dock/part2.rkt

@ -1,7 +1,6 @@
#lang racket
(require "parse.rkt"
(only-in rosette
bv bvand bvor bvxor bitvector->natural)
bv
syntax/parse/define
syntax/strip-context)
(provide (rename-out [dock-module-begin #%module-begin])

Loading…
Cancel
Save