diff options
author | Louis Pilfold <louis@lpil.uk> | 2020-04-19 22:12:15 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2020-04-19 22:12:15 +0100 |
commit | 6b34f8b616d4ec169ebf8d1e5a26d78ceebc8a59 (patch) | |
tree | d87b53a05a4053078c27adbc96366b14f13b6aa2 | |
parent | ddcff5f5ae859fee51e9ae087aafd6ddc1ab0912 (diff) | |
download | gleam_stdlib-6b34f8b616d4ec169ebf8d1e5a26d78ceebc8a59.tar.gz gleam_stdlib-6b34f8b616d4ec169ebf8d1e5a26d78ceebc8a59.zip |
Document Bool type
-rw-r--r-- | src/gleam/bool.gleam | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gleam/bool.gleam b/src/gleam/bool.gleam index 8dcc614..a1c7ede 100644 --- a/src/gleam/bool.gleam +++ b/src/gleam/bool.gleam @@ -1,7 +1,13 @@ -/// A set of utility functions for working with `Bool` values. - import gleam/order.{Order} +/// A type with two possible values, True and False. Used to indicate whether +/// things are... true or false! +/// +/// Often is it clearer and offers more type safety to define a custom type +/// than to use Bool. For example, rather than having a `is_teacher: Bool` +/// field consider having a `role: SchoolRole` field where SchoolRole is a custom +/// type that can be either Student or Teacher. +/// pub type Bool = Bool |