diff --git a/eta.ml b/eta.ml new file mode 100644 index 0000000..67f2fe0 --- /dev/null +++ b/eta.ml @@ -0,0 +1,4 @@ +let (>>=) a b x = a x + b x +let id x = x +let (&) = (@@) +let f x = (|>) x & id >>= id diff --git a/t/nan.ml b/t/nan.ml new file mode 100644 index 0000000..c92190c --- /dev/null +++ b/t/nan.ml @@ -0,0 +1,2 @@ +let nan = + float_of_bits 0x7F_F0_00_00_00_00_00_01L diff --git a/unrelated/emacs.md b/unrelated/emacs.md new file mode 100644 index 0000000..c3f495e --- /dev/null +++ b/unrelated/emacs.md @@ -0,0 +1,35 @@ +# OCaml とは全く関係ない emacs テクメモ + +## Kill Ring + +`kill` した文字列一覧 + +* `(popup-menu 'yank-menu)` +* `anything-show-kill-ring` (requires `anything`) + +## `list-buffers` つまり `C-x C-b` の挙動が変った死ね + +予期したバッファレイアウトにならなくなったので死ぬ。そこで + +``` +(global-change-key (kbd "") 'shell-round-visit-buffer) + +(defun good-old-list-buffers () + (interactive) + (if (not (string-equal (buffer-name (current-buffer)) "*Buffer List*")) + (save-selected-window (buffer-menu-other-window)))) +(global-change-key (kbd "C-x C-b") 'good-old-list-buffers) +``` + +## Interesting functions + +### `(bounds-of-thing-at-point THING)` + +``` +(defun hogehogera () + (interactive) + (let* ( (bds (bounds-of-thing-at-point 'filename)) + (p1 (car bds)) + (p2 (cdr bds)) ) + (message "%d %d" p1 p2))) +```