From 096aee3a1667e056fe906967cc2b078e8122e2b4 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 11 Dec 2010 14:19:42 -0500 Subject: Use `head' rather than `flip (!!) 0' --- Plugins/Monitors/Cpu.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Monitors/Cpu.hs b/Plugins/Monitors/Cpu.hs index fb5e9e2..ab89246 100644 --- a/Plugins/Monitors/Cpu.hs +++ b/Plugins/Monitors/Cpu.hs @@ -28,7 +28,7 @@ cpuData = do s <- B.readFile "/proc/stat" cpuParser :: B.ByteString -> [Float] cpuParser = - map (read . B.unpack) . tail . B.words . flip (!!) 0 . B.lines + map (read . B.unpack) . tail . B.words . head . B.lines parseCPU :: IO [Float] parseCPU = -- cgit v1.2.3