Skip to content

Commit

Permalink
Separate portable and non-portable :gen/fmap examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vharmain committed Jul 31, 2022
1 parent e1cab82 commit 0c09695
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1468,11 +1468,17 @@ Schemas can be used to generate values:
{:seed 10})
; => "kikka"

;; :gen/fmap
(mg/generate
[:and {:gen/fmap (partial str "kikka_")} string?]
{:seed 10, :size 10})
;; => "kikka_WT3K0yax2"

;; portable :gen/fmap (requires `org.babashka/sci` dependency to work)
(mg/generate
[:and {:gen/fmap '(partial str "kikka_")} string?]
{:seed 10, :size 10})
;; => "kikka_WT3K0yax2"
;; => "kikka_nWT3K0ya7"

;; :gen/schema
(mg/generate
Expand Down

0 comments on commit 0c09695

Please sign in to comment.