Extra rule: when-not not #41

LiamGoodacre opened this Issue Jun 15, 2012 · 1 comment


None yet

1 participant


I had the following pattern in an old project:

(if (not ?x) nil ?y)

kibit suggested the following alternative:

(when-not (not ?x) ?y)

This could be simplified to:

(when ?x ?y)

Therefore, I believe the following rule should be added:

[(when-not (not ?x) . ?y) (when ?x . ?y)]

Hope this helps!


Similar rule should be added for 'if-not not'. Both of the following are set up as rules:

[(if (not ?x) ?y ?z) (if-not ?x ?y ?z)]
[(when (not ?x) . ?y) (when-not ?x . ?y)]

But their "inverses" aren't:

[(if-not (not ?x) ?y ?z) (if ?x ?y ?z)]
[(when-not (not ?x) . ?y) (when ?x . ?y)]
@jonase jonase closed this in #99 Sep 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment