Fork me on GitHub
#ghostwheel
<
2020-05-22
>
Saikyun06:05:38

@hindol.adhya I managed to dig up my changes to ghostwheel.core. this adds the << operator for generators, so you could do this:

(>defn path?
  [p]
  [any? => boolean?
   << (gen/fmap #(path %) (gen/string))]
  (instance? Path p))

hindol06:05:39

Super. Thanks a lot for digging this up. Will check it out.

Saikyun07:05:47

hmu if you have any questions

Saikyun06:05:37

I called the concept gen-args , so if you're curious what's going on underneath, just search the code for it 🙂

Saikyun06:05:01

is this something you'd like a pull request for @clojurians.net? no idea if it's something you want in ghostwheel

gnl23:05:41

This looks good at first sight, but I wanna give it some more thought and also regarding the syntax. If you already have the code working and it's just a matter of hitting the Create PR button – please do, we can discuss it further on GitHub, so I don't have to keep track of it elsewhere.

gnl23:05:33

Brilliant, thanks. 🙂 I have a ton of Ghostwheel-related things to sift through, but will have a look as soon as I can.