diff options
Diffstat (limited to 'booleans')
-rw-r--r-- | booleans/booleans-test.scm | 16 | ||||
-rw-r--r-- | booleans/booleans.scm | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/booleans/booleans-test.scm b/booleans/booleans-test.scm new file mode 100644 index 0000000..78a78be --- /dev/null +++ b/booleans/booleans-test.scm @@ -0,0 +1,16 @@ +(use-modules (srfi srfi-64) + (booleans)) + +(test-begin "harness") + + +(test-equal "test-true-inverted-is-false" + #f + (boolean-invert #t)) + +(test-equal "test-true-inverted-is-false" + #t + (boolean-invert #f)) + + +(test-end "harness") diff --git a/booleans/booleans.scm b/booleans/booleans.scm new file mode 100644 index 0000000..6b2fe07 --- /dev/null +++ b/booleans/booleans.scm @@ -0,0 +1,6 @@ +(define-module (booleans)) + +(define-public (boolean-invert bool) + "Returns the opposite value of the +passed in boolean." + (not bool)) |