You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

732 B

A collection of helper functions for Advent of Code

Input manipulation

  (require 'dash)
  (defun advent/replace-multiple-regex-buffer (regex-list)
    "Takes REGEX-LIST as an alist ( regex . replacement )
  and applies each substitiution to the current buffer"
    (save-excursion
      (-each regex-list (lambda (x)
                          (goto-char (point-min))
                          (replace-regexp (car x) (cdr x))))))

Maze processing

  (defun advent/split-string-into-char-list (str)
    "Split the string into a list of chars"
    (--map (string-to-char it) (split-string str "\\|.+" t)))