+(defun filesets-ormap (fsom-pred lst)
+ "Return the tail of FSOM-LST for the head of which FSOM-PRED is non-nil."
+ (let ((fsom-lst lst)
+ (fsom-rv nil))
+ (while (and (not (null fsom-lst))
+ (null fsom-rv))
+ (if (funcall fsom-pred (car fsom-lst))
+ (setq fsom-rv fsom-lst)
+ (setq fsom-lst (cdr fsom-lst))))
+ fsom-rv))
+
+(defun filesets-some (fss-pred fss-lst)
+ "Return non-nil if FSS-PRED is non-nil for any element of FSS-LST.
+Like `some', return the first value of FSS-PRED that is non-nil."
+ (catch 'exit
+ (dolist (fss-this fss-lst nil)
+ (let ((fss-rv (funcall fss-pred fss-this)))
+ (when fss-rv
+ (throw 'exit fss-rv))))))
+;(fset 'filesets-some 'some) ;; or use the cl function
+
+(defun filesets-member (fsm-item fsm-lst &rest fsm-keys)
+ "Find the first occurrence of FSM-ITEM in FSM-LST.
+It is supposed to work like cl's `member*'. At the moment only the :test
+key is supported."
+ (let ((fsm-test (or (plist-get fsm-keys ':test)
+ (function equal))))
+ (filesets-ormap (lambda (fsm-this)
+ (funcall fsm-test fsm-item fsm-this))
+ fsm-lst)))
+;(fset 'filesets-member 'member*) ;; or use the cl function
+