Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This project features a variety of implementations in many programming languages
- [Falcon](/Falcon.fal)
- [Fortran](/Fortran.f90)
- [GDScript](/GDScript.gd)
- [Gleam](/gleam.gleam)
- [Go](/go.go)
- [Groovy](/Groovy.groovy)
- [Hack](/Hack.hack)
Expand Down
7 changes: 7 additions & 0 deletions gleam.gleam
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import input
import gleam/io

pub fn main() -> Nil {
let assert Ok(name) = input.input("What can I help you with? ")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Pattern match with 'let assert' will crash on error input.

Handle the Error case explicitly to prevent panics and improve user experience.

io.println("I'm sorry, I can't assist with {name}.")
}