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 authored Jul 31, 2022
1 parent e1cab82 commit ee7d063
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,12 @@ 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?]
Expand Down

0 comments on commit ee7d063

Please sign in to comment.