Comment by teh64
13 hours ago
I think naming conventions might help:
(b Box[InType]) Map[OutType any](transformFunction func(InType) OutType) Box[OutType]
Same in Python:
def map[U](self, f: Callable[[T], U]) -> Box[U]
vs
def map[OutType](self, transform_function: Callable[[InType], OutType]) -> Box[OutType]
and Java:
public <OutType> Box<OutType> map(Function<InType, OutType> transformFunction)
vs.
public <U> Box<U> map(Function<T, U> f)
No comments yet
Contribute on Hacker News ↗