diff --git a/scripts/aoc.rkt b/scripts/aoc.rkt index b42ea48..ff7136c 100644 --- a/scripts/aoc.rkt +++ b/scripts/aoc.rkt @@ -1,10 +1,10 @@ -#lang racket +#lang curly-fn racket ;; utilities for every challenge script (require "aoc-lib.rkt" threading syntax/parse/define (for-syntax racket/syntax) graph) (provide answer dbg memoize define/memoized - band bor bxor bshl bshr + band bor bxor bnot bshl bshr bset? bfield (all-from-out threading syntax/parse/define graph) (for-syntax (all-from-out racket/syntax))) @@ -16,8 +16,11 @@ (define band bitwise-and) (define bor bitwise-ior) (define bxor bitwise-xor) +(define bnot bitwise-not) (define bshl arithmetic-shift) (define bshr #{arithmetic-shift %1 (- %2)}) +(define bset? bitwise-bit-set?) +(define bfield bitwise-bit-field) ;; makes a memoization wrapper around a function (define (memoize func)