utils.lisp @ d4b651730553

Add scratch.lisp to .hgignore.
author Steve Losh <steve@stevelosh.com>
date Mon, 11 Apr 2016 14:40:32 +0000
parents 3512c67e0138
children ef04c7b3d0b8
(in-package #:euler.utils)

(defun random-exclusive (min max)
  "Return an integer in the range (`min`, `max`)."
  (+ 1 min (random (- max min 1))))

(defun dividesp (n divisor)
  "Return whether `n` is evenly divisible by `divisor`."
  (zerop (mod n divisor)))