aboutsummaryrefslogtreecommitdiff
path: root/src/content/chapter5_advanced_features/lesson00_use/code.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/chapter5_advanced_features/lesson00_use/code.gleam')
-rw-r--r--src/content/chapter5_advanced_features/lesson00_use/code.gleam6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/content/chapter5_advanced_features/lesson00_use/code.gleam b/src/content/chapter5_advanced_features/lesson00_use/code.gleam
index 37624ab..e7b435b 100644
--- a/src/content/chapter5_advanced_features/lesson00_use/code.gleam
+++ b/src/content/chapter5_advanced_features/lesson00_use/code.gleam
@@ -7,7 +7,7 @@ pub fn main() {
}
pub fn without_use() {
- result.try(get_usename(), fn(username) {
+ result.try(get_username(), fn(username) {
result.try(get_password(), fn(password) {
result.map(log_in(username, password), fn(greeting) {
greeting <> ", " <> username
@@ -17,7 +17,7 @@ pub fn without_use() {
}
pub fn with_use() {
- use username <- result.try(get_usename())
+ use username <- result.try(get_username())
use password <- result.try(get_password())
use greeting <- result.map(log_in(username, password))
greeting <> ", " <> username
@@ -25,7 +25,7 @@ pub fn with_use() {
// Here are some pretend functions for this example:
-fn get_usename() {
+fn get_username() {
Ok("alice")
}