Skip to content

Commit

Permalink
Update exercises/practice/pop-count/.meta/example.gleam
Browse files Browse the repository at this point in the history
Co-authored-by: Louis Pilfold <[email protected]>
  • Loading branch information
BNAndras and lpil authored Oct 31, 2023
1 parent 6960c8a commit 7eb00ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/practice/pop-count/.meta/example.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn recurse(number: Int, eggs: Int) -> Int {
case number {
0 -> eggs
_ -> {
let new_number = result.unwrap(int.floor_divide(number, 2), 0)
let new_number = number / 2
case int.is_odd(number) {
True -> recurse(new_number, eggs + 1)
_ -> recurse(new_number, eggs)
Expand Down

0 comments on commit 7eb00ae

Please sign in to comment.