fun <R> Boolean.ifFalse(block: () -> R): R? = if (!this) block() else null
/**
+ * Returns `this` but runs the given block if `this` is `true`.
+ *
+ * @param block The block to run if `this` is `true`
+ * @return `this`
+ */
+fun Boolean.onTrue(block: () -> Unit): Boolean = also { if (this) block() }
+
+/**
* Returns `this` but runs the given block if `this` is `false`.
*
* @param block The block to run if `this` is `false`