Add `define-condition*`, allow `do-[i]range` to go down, add `key` to `frequencies` and `proportions`
author |
Steve Losh <steve@stevelosh.com> |
date |
Sun, 15 Dec 2019 13:12:24 -0500 |
parents |
de9d10a9b4b5 |
children |
ea581753e904 |
(in-package :losh.lists)
(defun somelist (predicate list &rest more-lists)
"Call `predicate` on successive sublists of `list`, returning the first true result.
`somelist` is to `some` as `maplist` is to `mapcar`.
"
(if more-lists
(iterate
(for lists :first (cons list more-lists) :then (mapcar #'cdr lists))
(until (some #'null lists))
(thereis (apply predicate lists)))
(iterate (for l :on list)
(thereis (funcall predicate l)))))