mirror of
https://github.com/IBM/fp-go.git
synced 2025-11-23 22:14:53 +02:00
fix: modernize codebase
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -17,7 +17,7 @@ type (
|
||||
// computation := lazy.Of(42)
|
||||
//
|
||||
// // Transform it (not evaluated yet)
|
||||
// doubled := lazy.Map(func(x int) int { return x * 2 })(computation)
|
||||
// doubled := lazy.Map(N.Mul(2))(computation)
|
||||
//
|
||||
// // Evaluate when needed
|
||||
// result := doubled() // 84
|
||||
@@ -52,7 +52,7 @@ type (
|
||||
// Example:
|
||||
//
|
||||
// // An operator that doubles the value in a lazy computation
|
||||
// doubleOp := lazy.Map(func(x int) int { return x * 2 })
|
||||
// doubleOp := lazy.Map(N.Mul(2))
|
||||
//
|
||||
// // Apply it to a lazy computation
|
||||
// result := doubleOp(lazy.Of(5))() // 10
|
||||
|
||||
Reference in New Issue
Block a user