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

doobie.syntax.foldable.scala Maven / Gradle / Ivy

There is a newer version: 1.0.0-RC6
Show newest version
// 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