3 ms·
not sure about F#, but in haskell it's the former, and you can switch to the latter with the -XScopedTypeVariables language extension. though IME you rarely (if
by uryga 6y ago
not sure about F#, but in haskell it's the former, and you can switch to the latter with the -XScopedTypeVariables language extension. though IME you rarely (if ever) need it thanks to type inference.
- a1369209993 6y agoActually, on further consideration, you could restrict the ' to only occur where the type parameter is introduced, like so: List<X> foo(List<'X> inp) = ... List<X> bar(List<'X> xs) = ... # new X scoped to this declaration List<X> baz(List<X> xs) = ... # use foo's X ...