   (should
    (equal
     (whatif--simplify '(when t x y) nil)
-    (list 'unknown '(progn x y)))))
+    (list 'unknown '(progn x y))))
+  (should
+   (equal
+    (whatif--simplify '(when x y) '((y . 1)))
+    (list 'unknown '(when x 1)))))
+
+(ert-deftest simplify--unless ()
+  (should
+   (equal
+    (whatif--simplify '(unless nil x y) nil)
+    (list 'unknown '(progn x y))))
+  (should
+   (equal
+    (whatif--simplify '(unless t x y) nil)
+    (list 'value nil)))
+  (should
+   (equal
+    (whatif--simplify '(unless x y) '((y . 1)))
+    (list 'unknown '(unless x 1)))))

(require 'cl-lib)

(defun whatif--simplify (form bindings)
  "Simplify FORM in the context of BINDINGS using partial application.

Returns a list ('value VALUE) if we could simplify the entire
FORM to an expression, or a list ('unknown NEW-FORM) if some
parts of FORM could not be simplified."
  ;; TODO: replace 'unknown with 'incomplete or something similar.
  (pcase form
    ;; nil and t evaluate to themselves.
    (`nil (list 'value nil))
