-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdoc.go
23 lines (23 loc) · 906 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Package fuego provides various functional facilities.
//
//////////////////
// Important note:
//////////////////
//
// Go does not yet support parameterised methods:
// https://go.googlesource.com/proposal/+/master/design/43651-type-parameters.md#no-parameterized-methods
//
// The below construct is not currently possible:
// func (s Stream[T]) Map[R any](mapper Function[T, R]) Stream[R] {...}
// ^^^^^^^ no!
//
// One option would be to make `Map` a function rather than a method but constructs would be chained
// right-to-left rather than left-to-right, which I think is awkward.
// Example: "Map(Map(stream,f1),f2)" instead of "stream.Map(f1).Map(f2)".
//
// A syntactically lighter approach is provided with `SC`` and `C``.
// See functions `SC`` and `C `for casting Stream[Any] to a typed Stream[T any].
//
// Go 1.18 suffers from a performance issue:
//
package fuego