This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-14
Channels
- # adventofcode (12)
- # aleph (8)
- # announcements (6)
- # babashka (16)
- # beginners (217)
- # biff (7)
- # calva (30)
- # chlorine-clover (4)
- # cider (3)
- # clj-kondo (15)
- # cljdoc (6)
- # clojure (50)
- # clojure-europe (86)
- # clojure-finland (2)
- # clojure-nl (1)
- # clojure-norway (37)
- # clojure-uk (2)
- # clojurescript (8)
- # cursive (10)
- # datomic (13)
- # emacs (1)
- # fulcro (41)
- # helix (1)
- # humbleui (2)
- # joyride (7)
- # juxt (4)
- # lsp (19)
- # off-topic (47)
- # pathom (14)
- # polylith (5)
- # portal (7)
- # reagent (10)
- # releases (4)
- # sci (1)
- # scittle (18)
- # shadow-cljs (54)
- # test-check (2)
- # tools-deps (28)
Seems like (despite the plural name) gen/elements
only returns 1 element per gen? Is that right? How do I gen a random quantity of elements?
(def map-and-1-key-from
(gen/let [m (gen/not-empty
(gen/map gen/keyword gen/any-equatable))
;; Surprisingly works as name above describes.
;; How would I make `map-and-some-keys-from` instead?
k (gen/elements (keys m))]
[m k]))
(def my-gen (map-and-1-key-from gen/keyword