I’ve seen several examples of code using the symbol “That” with Generics. i.e.
def map[B, That](f : (A) => B) : That
But, due to the lack of google-ability of that word, I can’t find any documentation on what it does or how I use it.
Is it simply a normal type placeholder, or does it do something special?
Any identifiers inside
[...]are treated as type parameters.So in case of
def map[B, That](f : (A) => B) : ThatThatonly means a generic return type. Replace it withZfor example:def map[B, Z](f : (A) => B) : Zwould have the exact same effect.