Add note about why custom function dropLast is used

This commit is contained in:
Pol Dellaiera 2020-09-18 19:22:08 +02:00 committed by GitHub
parent 9e9f8e7d77
commit 268a298b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,7 @@ fmtComponent (p, c) =
<> "component: "
<> dQuote c
-- Same as init but handle empty list without throwing errors.
dropLast :: [a] -> [a]
dropLast l = take (length l - 1) l