From 085b06a112ea6f8efff432b86f0ce9dce6384b8c Mon Sep 17 00:00:00 2001 From: hasufell Date: Fri, 10 Oct 2014 17:48:22 +0200 Subject: [PATCH] PARSER: eta reduction --- Parser/Meshparser.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Parser/Meshparser.hs b/Parser/Meshparser.hs index df2fd9a..af0368d 100644 --- a/Parser/Meshparser.hs +++ b/Parser/Meshparser.hs @@ -12,13 +12,12 @@ import Parser.Core -- an array of float tuples. meshToArr :: String -- ^ the string to convert -> [PT] -- ^ the resulting vertice table -meshToArr xs = +meshToArr = fmap p2 . fmap (\(Just (x, _)) -> x) . filter (/= Nothing) . fmap (runParser parseVertice) . - lines $ - xs + lines -- | Creates a Parser that accepts a single vertice, such as 'v 1.0 2.0'.