This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn merge-seqs | |
"Merges two sorted sequences into a single sorted sequence" | |
([left right] | |
(merge-seqs (list left right))) | |
([[left right]] | |
(loop [l left, r right, result []] | |
(let [lhead (first l), rhead (first r)] | |
(cond | |
(nil? lhead) (concat result r) | |
(nil? rhead) (concat result l) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq confirm-kill-emacs 'y-or-n-p) ;; confirm to exit emacs | |
;; dippy bird FTW | |
(fset 'yes-or-no-p 'y-or-n-p) | |
(temp-buffer-resize-mode 1) ;; crazy cool | |
;; very important: keep a long list of yow lines | |
(setq yow-file "~/emacs/yow.lines") | |
;; almost as important: keep track of those tetris scores | |
(setq tetris-score-file "~/.emacs.d/tetris.score") | |
(global-set-key [home] (lambda () (interactive) (goto-char (point-min)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; /DTL and /END are indent level 0 | |
;; default for everything following a /DTL is indent level 1 | |
;; if { appears in a previous line without a closing }, cur-indent += 1 | |
;; if } appears in current line without an opening {. cur-indent -= 1 | |
;; TODO: line continuations should indent past command (?) | |
(defun dtl-indent-line () | |
"Indent current line as DTL code." | |
(interactive) | |
(beginning-of-line) |