Skip to content

Commit d3ef352

Browse files
authored
ch4 Simplify onlyFiles solution (#223)
1 parent 125dcf1 commit d3ef352

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/chapter4/test/no-peeking/Solutions.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ reverse :: ∀ a. Array a -> Array a
9595
reverse = foldl (\xs x -> [ x ] <> xs) []
9696

9797
onlyFiles :: Path -> Array Path
98-
onlyFiles p = filter (\p' -> not $ isDirectory p') $ allFiles p
98+
onlyFiles path = filter (not isDirectory) (allFiles path)
9999

100100
allSizes :: Array Path -> Array (Tuple String Int)
101101
allSizes paths =

0 commit comments

Comments
 (0)