Created
February 7, 2022 00:28
-
-
Save MattRoelle/433dd9659ce672c0a5de24f1b798fbe5 to your computer and use it in GitHub Desktop.
accumulate as a find?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fn party-has? [type] | |
(let [team (get-team-list :player)] | |
(accumulate [result false _ {: actor} (ipairs team) | |
:until result] | |
(and actor (= actor.type type))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment