Skip to content

Commit 268a298

Browse files
authored
Add note about why custom function dropLast is used
1 parent 9e9f8e7 commit 268a298

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Hie/Yaml.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ fmtComponent (p, c) =
5050
<> "component: "
5151
<> dQuote c
5252

53+
-- Same as init but handle empty list without throwing errors.
5354
dropLast :: [a] -> [a]
5455
dropLast l = take (length l - 1) l
5556

0 commit comments

Comments
 (0)