Skip to content

Commit

Permalink
[gleam][lasagna] add types
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofnds committed Mar 17, 2024
1 parent 81bff91 commit 42d3d69
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions gleam/lasagna/src/lasagna.gleam
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
pub fn expected_minutes_in_oven() {
pub fn expected_minutes_in_oven() -> Int {
40
}

pub fn remaining_minutes_in_oven(minutes: Int) {
pub fn remaining_minutes_in_oven(minutes: Int) -> Int {
expected_minutes_in_oven() - minutes
}

pub fn preparation_time_in_minutes(number_of_layers: Int) -> Int {
number_of_layers * 2
pub fn preparation_time_in_minutes(layers: Int) -> Int {
layers * 2
}

pub fn total_time_in_minutes(
number_of_layers: Int,
actual_minutes_in_oven: Int,
) -> Int {
preparation_time_in_minutes(number_of_layers) + actual_minutes_in_oven
pub fn total_time_in_minutes(layers: Int, minutes_in_oven: Int) -> Int {
preparation_time_in_minutes(layers) + minutes_in_oven
}

pub fn alarm() {
pub fn alarm() -> String {
"Ding!"
}

0 comments on commit 42d3d69

Please sign in to comment.