
doobie.syntax.foldable.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doobie-core_2.12 Show documentation
Show all versions of doobie-core_2.12 Show documentation
Pure functional JDBC layer for Scala.
// Copyright (c) 2013-2020 Rob Norris and Contributors
// This software is licensed under the MIT License (MIT).
// For more information see LICENSE or https://opensource.org/licenses/MIT
package doobie.syntax
import cats.*
import doobie.util.{foldable as F}
class FoldableOps[F[_]: Foldable, A: Monoid](self: F[A]) {
def foldSmash1(prefix: A, delim: A, suffix: A): A = F.foldSmash1(self)(prefix, delim, suffix)
}
trait ToFoldableOps {
implicit def toDoobieFoldableOps[F[_]: Foldable, A: Monoid](fa: F[A]): FoldableOps[F, A] =
new FoldableOps(fa)
}
object foldable extends ToFoldableOps
© 2015 - 2025 Weber Informatics LLC | Privacy Policy