aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2020-03-05 11:48:13 +0000
committerLouis Pilfold <louis@lpil.uk>2020-03-05 11:48:13 +0000
commitbec6ab98b6c139f3074028e71707208d51eb3f9b (patch)
treebef66ede3737089b3db8969845347f9ef4c75946 /src
parentf11cb990283fbd47b418a94c6840efe03954d28e (diff)
downloadgleam_stdlib-bec6ab98b6c139f3074028e71707208d51eb3f9b.tar.gz
gleam_stdlib-bec6ab98b6c139f3074028e71707208d51eb3f9b.zip
int.is_odd
Diffstat (limited to 'src')
-rw-r--r--src/gleam/int.gleam4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gleam/int.gleam b/src/gleam/int.gleam
index 6a93e2f..9ff5328 100644
--- a/src/gleam/int.gleam
+++ b/src/gleam/int.gleam
@@ -35,3 +35,7 @@ pub fn max(a: Int, b: Int) -> Int {
pub fn is_even(x: Int) -> Bool {
x % 2 == 0
}
+
+pub fn is_odd(x: Int) -> Bool {
+ x % 2 != 0
+}