mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 22:21:18 +02:00
fn: breaking - fix type variables for better inference
This commit is contained in:
2
fn/fn.go
2
fn/fn.go
@@ -23,7 +23,7 @@ func Iden[A any](a A) A {
|
||||
// Const is a function that accepts an argument and returns a function that
|
||||
// always returns that value irrespective of the returned function's argument.
|
||||
// This is also quite useful in conjunction with higher order functions.
|
||||
func Const[A, B any](a A) func(B) A {
|
||||
func Const[B, A any](a A) func(B) A {
|
||||
return func(_ B) A {
|
||||
return a
|
||||
}
|
||||
|
Reference in New Issue
Block a user