JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in
# read inpu at compile-time and create a custom func to check whether a number is in one of the # given ranges. This turned out to be almost 4x faster than writing it as a func # from https://abhinavsarkar.net/notes/2025-aoc-1/#day-2 (defmacro in-range? [n & _] (def ranges (parse-input (slurp input-path))) ~(or ,;(map (fn [[s e]] ~(<= ,s ,n ,e)) ranges)))