Gleam Programming Language Tour
tour.gleam.run·17w·
Discuss: Hacker News

Basics


Hello world

Here is a tiny program that prints out the text “Hello, Joe!”. We’ll explain how it works shortly.

In a normal Gleam project this program would be run using the command gleam run on the command line, but here in this tour the program is compiled and run inside your web browser, allowing you to try Gleam without installing anything on your computer.

Try changing the text being printed to Hello, Mike! and see what happens.

import gleam/io

pub fn main() {
io.println("Hello, Joe!")
}
</>Run code snippet

Modules

Gleam code is organized into units called modules. A module is a bunch of definitions (of types, functions, etc.) that seem to belong together. For example, the [gleam/io ](https:…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help