diff --git a/p5/p5.org b/p5/p5.org index 8c93691..8c02849 100644 --- a/p5/p5.org +++ b/p5/p5.org @@ -15,3 +15,16 @@ First load the data as a list of cons cells (start . end) (eval-buffer)) #+end_src +#+begin_src emacs-lisp + (length + (-filter (lambda (id) + (--any (and (>= id (car it)) + (<= id (cdr it))) +#+end_src + +#+begin_src emacs-lisp + (setq sorted-ranges (--sort (< (car it) (car other)) ranges)) +#+end_src +#+RESULTS: +: 744 +