F # duplicate definition

in the source code of the software provider Power # P #: I saw this (in lapack_service_netlib.fs )

 member this.dgemm_((a:matrix),(b:matrix)) = // allocate results let c = Matrix.zero (m) (n) // transpose let c = Matrix.transpose c ... // fixups let c = Matrix.transpose c // result tuple c 

Why does this complicate? c get duplicate definition?

+5
source share
1 answer

This is shading ; in the function / class / member area, any local let bindings will be obscured by subsequent let associations with the same name.

See also Shadow and Nesting Function .

+7
source

Source: https://habr.com/ru/post/971294/


All Articles