Skip to content

Commit

Permalink
Make Messages Joinable
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Oct 5, 2024
1 parent fd8d661 commit 2e231f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/gossamer.Joinable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package gossamer

import rudiments.*
import fulminate.*

import language.experimental.pureFunctions
import language.experimental.into
Expand All @@ -27,6 +28,8 @@ object Joinable:
elements.each(buffer.append(_))
buffer()

given Message is Joinable = _.foldLeft(m"")(_+_)

trait Joinable:
type Self
def join(elements: Iterable[Self]): Self

0 comments on commit 2e231f1

Please sign in to comment.