Re: Spec: Nested Cat Calls

2017-05-18 Thread Alexander Sedgwick
That worked - thank you! On Tuesday, May 16, 2017 at 11:38:08 PM UTC-5, Alex Miller wrote: > > The problem here is that s/or is NOT a regex op and introduces a new level > of spec nesting. Try using s/alt (which IS a regex op) instead. > > > On Tuesday, May 16, 2017 at 11:34:10 PM UTC-5, Alexande

Re: Spec: Nested Cat Calls

2017-05-16 Thread Alex Miller
The problem here is that s/or is NOT a regex op and introduces a new level of spec nesting. Try using s/alt (which IS a regex op) instead. On Tuesday, May 16, 2017 at 11:34:10 PM UTC-5, Alexander Sedgwick wrote: > > I'm looking to better understand how nested cats work (now that just > sounds f

Spec: Nested Cat Calls

2017-05-16 Thread Alexander Sedgwick
I'm looking to better understand how nested cats work (now that just sounds funny). I've found that sometimes spec/cat will generate a nested list: ```clojure (gen/sample (s/gen (s/cat :start #{\a} :content (s/cat :nothing (s/? #{\^})