https://kotlinlang.org logo
Title
m

mitch

09/26/2020, 9:04 PM
s

sam

09/26/2020, 9:05 PM
ok cool will take a look shortly
👍 1
I can't see where the edge cases are calculated
Am I going mad
m

mitch

09/26/2020, 9:34 PM
It's in Arb.flatmap. the function already does that.
That list.flamap(otherList)
s

sam

09/26/2020, 9:44 PM
In bind
m

mitch

09/26/2020, 9:47 PM
Yeah bind uses flatmap, downthe bottom in the private function
private fun <A, B, C> Gen<A>.bind(other: Gen<B>, fn: (A, B) -> C): Arb<C> {
   val arb = when (this) {
      is Arb -> this
      is Exhaustive -> this.toArb()
   }

    return arb.flatMap { a ->
      when (other) {
         is Arb -> other.map { fn(a, it) }
         is Exhaustive -> other.toArb().map { fn(a, it) }
      }
   }
}
s

sam

09/26/2020, 9:53 PM
Ah got it
Merged
m

mitch

09/26/2020, 11:41 PM
🎉 thanks @sam!
s

sam

09/27/2020, 12:05 AM
Thanks for the work
m

mitch

09/27/2020, 12:17 AM
All good! Thanks for your support Sam you've been a champ. I'm quite sure that's most if not all of the core functions migrated away from the old arb builder.
s

sam

09/27/2020, 12:17 AM
Yep things much better. Looking solid for inclusion in a 4.3 release.
🎉 1