Javascript
// Method Reference -> Math.sqrt
// Example
var roots = [1, 4, 9].map(Math.sqrt);
Java
import java.util.stream.DoubleStream;
// Method Reference -> Math::sqrt
// Example
double[] roots = DoubleStream.of(1, 4, 9).map(Math::sqrt).toArray();
Python
# Method Reference -> math.sqrt
# Example
import math
roots = map(math.sqrt, [1, 4, 9])
Clojure
;; Method Reference -> #(Math/sqrt %)
;; Example
(map #(Math/sqrt %) [1, 4, 9])
Ruby
# Method Reference -> Math.method(:sqrt)
# Example
roots = [1, 4, 9].map &Math.method(:sqrt)