diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2009-02-19 03:24:17 +0100 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2009-02-19 03:24:17 +0100 |
commit | d7677476b38b2cf51f1b3fb97f2c2f6aec759cbe (patch) | |
tree | c161067e260aed1e870400b3f206ec43c260823b /XMonad/Layout | |
parent | 059278bcd17a6598583d4c8ad2a34822fd061779 (diff) | |
download | XMonadContrib-d7677476b38b2cf51f1b3fb97f2c2f6aec759cbe.tar.gz XMonadContrib-d7677476b38b2cf51f1b3fb97f2c2f6aec759cbe.tar.xz XMonadContrib-d7677476b38b2cf51f1b3fb97f2c2f6aec759cbe.zip |
Cleanup X.L.Mosaic, without breaking it
Ignore-this: d49ed55fe8dc2204256dff9252384745
darcs-hash:20090219022417-1499c-d9cbc89f5035cf3a3b7698bf2b4bfe306ec3b7b5.gz
Diffstat (limited to 'XMonad/Layout')
-rw-r--r-- | XMonad/Layout/Mosaic.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/XMonad/Layout/Mosaic.hs b/XMonad/Layout/Mosaic.hs index eca1978..aec2339 100644 --- a/XMonad/Layout/Mosaic.hs +++ b/XMonad/Layout/Mosaic.hs @@ -142,8 +142,8 @@ shrinkMaster [] = [] shrinkMaster (x:xs) = x/2:xs splits :: Int -> Rectangle -> [Rational] -> [[Rectangle]] -splits num rect sz = splitsL rect $ makeTree $ normalize - $ map abs $ reverse $ take num sz +splits num rect = splitsL rect . makeTree . normalize + . map abs . reverse . take num -- recursively enumerate splits splitsL :: Rectangle -> Tree Rational -> [[Rectangle]] @@ -165,9 +165,8 @@ interleave xs ys | lx > ly = zc xs (extend lx ys) extend :: Int -> [a] -> [a] extend n pat = do - (p,e') <- zip pat $ take m (repeat True) ++ repeat False - let e = if e' then [p] else [] - (e++) $ take d $ repeat p + (p,e) <- zip pat $ replicate m True ++ repeat False + [p | e] ++ replicate d p where (d,m) = n `divMod` length pat normalize :: Fractional a => [a] -> [a] |