diff options
author | David Roundy <droundy@darcs.net> | 2007-06-12 15:28:53 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-06-12 15:28:53 +0200 |
commit | 22ffd93fca26ba33369231a8554a6885714b0834 (patch) | |
tree | 9256f4469581c7d27e0c6e731f0d749f6f8ca9f9 /StackSet.hs | |
parent | 6153458ce51cadbaf31fbc3fcbc4ca14a76772e8 (diff) | |
download | xmonad-22ffd93fca26ba33369231a8554a6885714b0834.tar.gz xmonad-22ffd93fca26ba33369231a8554a6885714b0834.tar.xz xmonad-22ffd93fca26ba33369231a8554a6885714b0834.zip |
add differentiate function to StackSet to go [a] -> Stack a.
darcs-hash:20070612132853-72aca-01d24069e1f7b66d2dbc9c47e24e4334a45c4346.gz
Diffstat (limited to 'StackSet.hs')
-rw-r--r-- | StackSet.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/StackSet.hs b/StackSet.hs index 99684ad..581eb0b 100644 --- a/StackSet.hs +++ b/StackSet.hs @@ -75,7 +75,7 @@ module StackSet ( StackSet(..), Workspace(..), Screen(..), Stack(..), RationalRect(..), - new, view, lookupWorkspace, peek, index, integrate, focusUp, focusDown, + new, view, lookupWorkspace, peek, index, integrate, differentiate, focusUp, focusDown, focusWindow, member, findIndex, insertUp, delete, shift, filter, swapMaster, swapUp, swapDown, modify, float, sink -- needed by users ) where @@ -263,6 +263,13 @@ integrate Empty = [] integrate (Node x l r) = reverse l ++ x : r -- | +-- /O(n)/. Texture a list. +-- +differentiate :: [a] -> Stack a +differentiate [] = Empty +differentiate (x:xs) = Node x [] xs + +-- | -- /O(n)/. 'filter p s' returns the elements of 's' such that 'p' evaluates to -- True. Order is preserved, and focus moves to the next node to the right (if -- necessary). |