Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

f# duplicate definition

Tags:

f#

shadowing

in F# powerpack math provider source code: 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 complile? does c get duplicate definition?

like image 953
matlabdbuser Avatar asked May 19 '11 19:05

matlabdbuser


People also ask

What is Mtouch Facebook?

Facebook Touch is an advanced Facebook app that has many distinct features. H5 apps developed it as an app made especially for touchscreen phones. Available and applicable across all smartphones, Facebook Touch offers a fine user interface and serves as an alternative to the typical Facebook App.


1 Answers

This is shadowing; at function/class/member scope, any local let bindings will be shadowed by subsequent let bindings to the same name.

See also Shadowing and Nested function

like image 170
Brian Avatar answered Sep 17 '22 23:09

Brian