All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dexclaimation.ahql.utils.TKeep.scala Maven / Gradle / Ivy

Go to download

Akka Http Query Library, a minimal GraphQL client and server exposing as a set of akka-http utilities

The newest version!
//
//  TryKeep.scala
//  ahql
//
//  Created by d-exclaimation on 3:26 AM.
//

package io.github.dexclaimation.ahql.utils

import akka.stream.scaladsl.Keep

import scala.util.Try

object TKeep {
  def both[R, L](other: => Try[L]): R => Try[(R, L)] =
    r => other.map(Keep.both(r, _))

  def threeR[R1, R2, L](other: => Try[L]): ((R1, R2)) => Try[(R1, R2, L)] =
    r => other.map(FlatKeep.bothR(r, _))
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy