aboutsummaryrefslogtreecommitdiffstats
path: root/StackSet.hs
diff options
context:
space:
mode:
authorBrent Yorgey <byorgey@gmail.com>2007-10-22 21:13:33 +0200
committerBrent Yorgey <byorgey@gmail.com>2007-10-22 21:13:33 +0200
commit247e5eaa2acfeefb0be728f8a767aa878c244576 (patch)
tree146f26fc973f2e23a0dc3b9aacbba1adadcac34e /StackSet.hs
parent1ca92abeab628df1275f0f6175b4750a9bcd1f07 (diff)
downloadxmonad-247e5eaa2acfeefb0be728f8a767aa878c244576.tar.gz
xmonad-247e5eaa2acfeefb0be728f8a767aa878c244576.tar.xz
xmonad-247e5eaa2acfeefb0be728f8a767aa878c244576.zip
StackSet.hs: (differentiate): 'Texture' doesn't mean anything to me; replace with a more descriptive comment.
darcs-hash:20071022191333-bd4d7-e2189eb1f8c97ee294435d37f0fb0e73081c3e35.gz
Diffstat (limited to 'StackSet.hs')
-rw-r--r--StackSet.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/StackSet.hs b/StackSet.hs
index 654ff5d..3b23d59 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -324,9 +324,10 @@ integrate (Stack x l r) = reverse l ++ x : r
integrate' :: Maybe (Stack a) -> [a]
integrate' = maybe [] integrate
--- |
--- /O(n)/. Texture a list.
---
+-- |
+-- /O(n)/. Turn a list into a possibly empty stack (i.e., a zipper):
+-- the first element of the list is current, and the rest of the list
+-- is down.
differentiate :: [a] -> Maybe (Stack a)
differentiate [] = Nothing
differentiate (x:xs) = Just $ Stack x [] xs