diff --git a/Exercises/exercise-3/Filesystem.hs b/Exercises/exercise-3/Filesystem.hs index 1e942b0..d304dc2 100644 --- a/Exercises/exercise-3/Filesystem.hs +++ b/Exercises/exercise-3/Filesystem.hs @@ -95,7 +95,7 @@ findAll name = filesystem file dir file :: Name -> Int -> [Path] file n _ = if n == name then [[n]] else [] dir :: Name -> [[Path]] -> [Path] - dir n subs = map (\path -> [n] ++ path) (concat subs) + dir n subs = map (n :) (concat subs) -- >>> findAll "notes.txt" example -- [["root","desktop","notes.txt"],["root","pictures","holiday2018","notes.txt"]]