Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
;; At times I need a condition that that is opposite. That gives me two options, ;; * come up with negation test that may not read clearly ;; * wrap the test in a (not test) form ;; * do the test, but swap the /then/ and /else/ parts. ;; ;; Since I'm a lazy programmer, the first two options don't appeal to me. The third option seems ugly to me. This macro takes the second option, but makes it invisible to the programmer. (defmacro if-not (cond then &rest else) "Reverses the meaning of the conditional. Saves some typing and lets the code read better." `(if (not ,cond) ,then ,@else))
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)