Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
def geocode(String location) {
    // implementation returns [48.824068, 2.531733] for Paris, France
    [48.824068, 2.531733]
}

def (_lat, lon_long) = geocode("Paris, France")

assert _lat == 48.824068
assert lon_long == 2.531733

And you can also define the types of the variables in one shot as follows:

...