From e60487580a30a51e896c32210198758d2e15a4d9 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 5 Mar 2020 11:46:08 +0000 Subject: int.is_even --- src/gleam/int.gleam | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/gleam/int.gleam b/src/gleam/int.gleam index a638602..6a93e2f 100644 --- a/src/gleam/int.gleam +++ b/src/gleam/int.gleam @@ -32,3 +32,6 @@ pub fn max(a: Int, b: Int) -> Int { } } +pub fn is_even(x: Int) -> Bool { + x % 2 == 0 +} -- cgit v1.2.3