creative-scala icon indicating copy to clipboard operation
creative-scala copied to clipboard

Confusing example of substitution in methods

Open mattkohl opened this issue 8 years ago • 1 comments

Should this example (from creative-scala/src/pages/methods/semantics.md):

{
 val x = 2
 square(2)
}

have x as an argument to the square method:

{
  val x = 2
  square(x)
}

?

mattkohl avatar Apr 28 '17 13:04 mattkohl

Yes, that looks like an error.

noelwelsh avatar May 28 '17 19:05 noelwelsh