ref: c8933c077bc49864bf6dce8d021f5f8c6fc4aa9e
parent: 2ee630ff1f9883bb11966415202b4beceac9a04c
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Sat Aug 17 15:47:34 EDT 2024
Add utility function.
--- a/src/MicroHs/List.hs
+++ b/src/MicroHs/List.hs
@@ -68,3 +68,6 @@
| otherwise = []
where f a (b:bs) | a == b = Just bs
f _ _ = Nothing
+
+dropEnd :: Int -> [a] -> [a]
+dropEnd n = reverse . drop n . reverse
--
⑨