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.
750 B
750 B
A collection of helper functions for Advent of Code
inout manipulation
(require 'dash)
(defun advent/replace-multiple-regex-buffer (regex-list)
"Takes REGEX-LIST as an alist ( regex . replacement )
and applies each substitiution
"
(insert-file-contents "input")
(goto-char (point-min))
(replace-regexp "\\([0-9]+\\),\\([0-9]+\\)" "(\\1 \\2)")
(goto-char (point-min))
(insert "(setq data '(")
(goto-char (point-max))
(insert "))")
(eval-buffer))
(setq width 71 ;71
height 71
start-pos '(0 0)
end-pos (list (- width 1) (- height 1)))
(setq full-data data)