diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-06-04 08:25:01 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-06-04 08:25:01 +0200 |
commit | 8228312e2cdacbcec493482c02be42f5b56b8a91 (patch) | |
tree | ee168aa441c7228b58a5b34cb3cb9f7b13f718bb | |
parent | 27b3728fe3be336de84aaa32ede083f409f8ac75 (diff) | |
download | xmonad-8228312e2cdacbcec493482c02be42f5b56b8a91.tar.gz xmonad-8228312e2cdacbcec493482c02be42f5b56b8a91.tar.xz xmonad-8228312e2cdacbcec493482c02be42f5b56b8a91.zip |
Add integrate
darcs-hash:20070604062501-a5988-52b9c72b3f989ac55438677442db48d0cf5d06e7.gz
Diffstat (limited to '')
-rw-r--r-- | StackSet.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/StackSet.hs b/StackSet.hs index 7374da3..1f6db7e 100644 --- a/StackSet.hs +++ b/StackSet.hs @@ -76,7 +76,7 @@ -- module StackSet ( StackSet(..), Workspace(..), Screen(..), Stack(..), RationalRect(..), - new, view, lookupWorkspace, peek, index, focusUp, focusDown, + new, view, lookupWorkspace, peek, index, integrate, focusUp, focusDown, focusWindow, member, findIndex, insertUp, delete, shift, swapMaster, swapUp, swapDown, modify, float, sink -- needed by users ) where @@ -244,6 +244,13 @@ peek :: StackSet i a s -> Maybe a peek = with Nothing (return . focus) -- +-- /O(n)/. Flatten a Stack into a list. +-- +integrate :: Stack a -> [a] +integrate Empty = [] +integrate (Node x l r) = reverse l ++ x : r + +-- -- /O(s)/. Extract the stack on the current workspace, as a list. -- The order of the stack is determined by the master window -- it will be -- the head of the list. The implementation is given by the natural |