Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Partial1 ¶
func Partial1[T1, T2, T3 any](f func(T1, T2) T3, s1 T1) func(T2) T3
Takes a function of two arguments and turns it into a function with one argument with the first argument bound. This is useful replacement for a Class with instance variables in OOP.
func Partial2 ¶
func Partial2[T1, T2, T3, T4 any](f func(T1, T2, T3) T4, s1 T1) func(T2, T3) T4
Takes a function of three arguments and turns it into a function with two arguments with the first argument bound. This is useful replacement for a Class with instance variables in OOP. TODO I wonder if there is a way to make the function variadic and still preserve generic type safety? I don't think so because type parameters cannot be variadic.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.