Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ fb6cfb8aea15a1b339e3ed69e1e96acd7df4cae6

# Scala Steward: Reformat with scalafmt 3.7.3
9949b27715a382afd78b992ced481ace61cc69b7

# Scala Steward: Reformat with scalafmt 3.7.5
b0719dbc23f841458ff8db757517e49df76e6708
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
runner.dialect = scala3
version = "3.7.4"
version = "3.7.5"
maxColumn = 120
Original file line number Diff line number Diff line change
Expand Up @@ -129,31 +129,30 @@ private[binding] object Binding2Or3:

object BindingSeqOrWithFilter:
extension [A](inline bindingSeqOrWithFilter: BindingSeqOrWithFilter[A])

/** Returns a [[BindingSeq]] that maps each element of this [[BindingSeq]] via `f`
*
* @param f
* The mapper function, which may contain magic [[Binding#bind bind]] calls.
*/
inline def map[B](inline f: A => B): BindingSeq[B] = ${ Macros.map('bindingSeqOrWithFilter, 'f) }

/** Returns a [[BindingSeq]] that flat-maps each element of this [[BindingSeq]] via `f`
*
* @param f
* The mapper function, which may contain magic [[Binding#bind bind]] calls.
*/
inline def flatMap[B](inline f: A => BindingSeq[B]): BindingSeq[B] = ${
Macros.flatMap('bindingSeqOrWithFilter, 'f)
}

/** Returns a view of this [[BindingSeq]] that applied a filter of `condition`
*
* @param f
* The mapper function, which may contain magic [[Binding#bind bind]] calls.
*/
inline def withFilter(inline condition: A => Boolean): BindingSeq.WithFilter[A] = ${
Macros.withFilter('bindingSeqOrWithFilter, 'condition)
}
/** Returns a [[BindingSeq]] that flat-maps each element of this [[BindingSeq]] via `f`
*
* @param f
* The mapper function, which may contain magic [[Binding#bind bind]] calls.
*/
inline def flatMap[B](inline f: A => BindingSeq[B]): BindingSeq[B] = ${
Macros.flatMap('bindingSeqOrWithFilter, 'f)
}

/** Returns a view of this [[BindingSeq]] that applied a filter of `condition`
*
* @param f
* The mapper function, which may contain magic [[Binding#bind bind]] calls.
*/
inline def withFilter(inline condition: A => Boolean): BindingSeq.WithFilter[A] = ${
Macros.withFilter('bindingSeqOrWithFilter, 'condition)
}
end extension
end BindingSeqOrWithFilter

Expand Down