Skip to content

How are booleans in Gleam represented? #1026

Discussion options

You must be logged in to vote

Booleans are not a primitive type with a dedicated literal syntax, they're just a normal custom type but defined in the prelude.

pub type Bool {
  True
  False
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@CrowdHailer
Comment options

@lpil
Comment options

@Rudxain
Comment options

Answer selected by lpil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants