Skip to content

Commit

Permalink
Make foldr & foldl example code match commented return
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaime Terreu committed Dec 26, 2024
1 parent 65cea00 commit c2009f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Dict.elm
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,11 @@ map func dict =
import Dict exposing (Dict)
getAges : Dict String User -> List String
getAges : Dict String User -> List Int
getAges users =
Dict.foldl addAge [] users
addAge : String -> User -> List String -> List String
addAge : String -> User -> List Int -> List Int
addAge _ user ages =
user.age :: ages
Expand All @@ -534,11 +534,11 @@ foldl func acc dict =
import Dict exposing (Dict)
getAges : Dict String User -> List String
getAges : Dict String User -> List Int
getAges users =
Dict.foldr addAge [] users
addAge : String -> User -> List String -> List String
addAge : String -> User -> List Int -> List Int
addAge _ user ages =
user.age :: ages
Expand Down

0 comments on commit c2009f5

Please sign in to comment.