Commit graph

4 commits

Author SHA1 Message Date
William Carroll
8584059e7c Support cycle/{append,remove}
Supporting these functions was a little tricky. For example, how should we
handle calling cycle/remove on the item that is currently focused? After
attempting to be clever, I decided to just set the value to nil and let the
consumer decide what is best for them. I can always support a more opinionated
version that fallsback to previous-index if previous-index is set. But until I
have a better idea of how I'm going to consume this, I think nil is the best
option.
2020-02-10 10:06:33 +00:00
William Carroll
f145bc9eb6 Support cycle/focus-item
I oftentimes call `cycle/focus` and pass `(lambda (a) (equal a b))`. This
function should tighten up my code.
2020-02-08 15:55:59 +00:00
William Carroll
3f54dd8601 Support cycle/empty?
Add predicate for determining if a cycle contains items.

Updated cycle/{new,from-list} to support setting current-index to nil when a
consumer calls it with an empty list.
2020-02-08 15:55:53 +00:00
William Carroll
578ed1ba98 Move move .emacs.d out of configs/shared
Moving all of my Emacs-related files into their own directory at the root of
this repository.
2020-01-30 16:00:29 +00:00
Renamed from configs/shared/.emacs.d/wpc/cycle.el (Browse further)