Skip to content

Instantly share code, notes, and snippets.

@Arnot
Last active August 14, 2017 11:46
Show Gist options
  • Select an option

  • Save Arnot/8a952dbc66d38bf726c5dfa3b0cbd02b to your computer and use it in GitHub Desktop.

Select an option

Save Arnot/8a952dbc66d38bf726c5dfa3b0cbd02b to your computer and use it in GitHub Desktop.
(defmacro not-equal (&rest rest)
(let ((form '())
(prev (pop rest)))
(while rest
(dolist (cur rest)
(push `(/= ,prev ,cur) form))
(setf prev (pop rest)))
`(or ,@form)))
@Arnot

Arnot commented Aug 14, 2017

Copy link
Copy Markdown
Author

This is the same as (not (= ...)), so probably not worth the n! expansions..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment