Skip to content

Commit c2009f5

Browse files
author
Jaime Terreu
committed
Make foldr & foldl example code match commented return
1 parent 65cea00 commit c2009f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Dict.elm

+4-4
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,11 @@ map func dict =
510510
511511
import Dict exposing (Dict)
512512
513-
getAges : Dict String User -> List String
513+
getAges : Dict String User -> List Int
514514
getAges users =
515515
Dict.foldl addAge [] users
516516
517-
addAge : String -> User -> List String -> List String
517+
addAge : String -> User -> List Int -> List Int
518518
addAge _ user ages =
519519
user.age :: ages
520520
@@ -534,11 +534,11 @@ foldl func acc dict =
534534
535535
import Dict exposing (Dict)
536536
537-
getAges : Dict String User -> List String
537+
getAges : Dict String User -> List Int
538538
getAges users =
539539
Dict.foldr addAge [] users
540540
541-
addAge : String -> User -> List String -> List String
541+
addAge : String -> User -> List Int -> List Int
542542
addAge _ user ages =
543543
user.age :: ages
544544

0 commit comments

Comments
 (0)