This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-21
Channels
- # announcements (1)
- # aws (18)
- # babashka (5)
- # beginners (72)
- # biff (2)
- # calva (38)
- # cider (2)
- # clj-commons (6)
- # clj-yaml (2)
- # clojars (7)
- # clojure (41)
- # clojure-austin (5)
- # clojure-europe (78)
- # clojure-nl (1)
- # clojure-norway (18)
- # clojure-uk (3)
- # clojurescript (13)
- # component (9)
- # cursive (37)
- # datahike (3)
- # datomic (7)
- # fulcro (7)
- # graphql (3)
- # holy-lambda (2)
- # honeysql (8)
- # introduce-yourself (1)
- # jobs (1)
- # kaocha (1)
- # leiningen (19)
- # lsp (104)
- # malli (5)
- # nbb (8)
- # off-topic (60)
- # polylith (22)
- # portal (2)
- # reagent (24)
- # reveal (1)
- # shadow-cljs (126)
- # test-check (11)
- # tools-build (39)
- # vim (23)
- # xtdb (10)
SELF-SOLVED
Ha! My question had its own answer in it 🙂 It may not be stylish, but (tgen/fmap #(apply list %) (tgen/tuple …))
works.
Hello test.checkers: I have a successful tgen/tuple
generator, but it produces vectors and i want to produce lists. The following does not work: (tgen/fmap list (tgen/tuple …))
. I’m not surprised because the appropriate postprocessing would be something like (apply list (tgen/generate (tgen/tuple …)))
, but I don’t want to exit the generators via something like tgen/generate
and then produce a list, I want a generator that produces a tuple-like list. I’d be grateful for advice!
does list*
work?
there's not many good times to use list*, but this is maybe one of them
you guys are fast :)
my installation can’t find list* in either test.check.generators or in spec.gen.alpha
but #(apply list #) works; (comp apply list) doesn’t quite because it only passes one arg to apply
list* seems stylish to me because it’s shorter than #(apply list %). The resulting seq is ok for my needs.