arrow-kt / arrow-fx

Λrrow Fx is part of Λrrow, a functional companion to Kotlin's Standard Library
http://arrow-kt.io
Other
64 stars 15 forks source link

parMapN arity 7 #356

Closed LordRaydenMK closed 3 years ago

LordRaydenMK commented 3 years ago

Issue

Fixes https://github.com/arrow-kt/arrow-fx/issues/343

Status

READY

Description

parMapN arity 7 based on the implementation arity 6

Todos

Related PRs

nomisRev commented 3 years ago

kotest has a checkAll function up to arity 6, so I couldn't implement some of the tests that exist for arity 6 in arity 7, should we create a ticket with kotest or there is some workaround?

Could be worked around by adding the following in ArrowFxSpec. Opening a ticket or discussing with them on Slack if they're open to adding up-to arity 10 might be good 👍

  suspend fun <A, B, C, D, E, F, G> checkAll(
    genA: Arb<A>,
    genB: Arb<B>,
    genC: Arb<C>,
    genD: Arb<D>,
    genE: Arb<E>,
    genF: Arb<F>,
    genG: Arb<G>,
    property: suspend PropertyContext.(A, B, C, D, E, F, G) -> Unit
  ): PropertyContext =
    checkAll(
      iterations,
      genA,
      genB,
      genC,
      genD,
      genE,
      Arb.bind(genF, genG, ::Tuple2)
    ) { a, b, c, d, e, (f, g) ->
      property(a, b, c, d, e, f, g)
    }

Thanks for this @LordRaydenMK 😘

LordRaydenMK commented 3 years ago

Thanks for this @LordRaydenMK kissing_heart

Always a pleasure to contribute, and thank you for your help @nomisRev

nomisRev commented 3 years ago

I am a bit worried about the amount of tests iterations this runs

It runs the specified iterations from ArrowFxSpec, which is set to 350 atm. These tests run quite fast. The Arrow Fx Coroutines build is still much faster than the Arrow Core one.