2 added 125 characters in body edited Aug 20 '13 at 13:49 Arshdeep Singh 16122 bronze badges Scala and ML use `=>` in pattern matching. Scala Example : ``````x match { case 1 => "one" case 2 => "two" case _ => "many" } `````` ML Example: ``````case shape of Circle (_, r) => 3.14 * r * r | Square (_, s) => s * s | Triangle (a, b, c) => heron (a, b, c) `````` Haskell uses it for class constraints : ``````(Eq a) => a -> a -> Bool -- type a should be a member of the Eq typeclass `````` Scala and ML use `=>` in pattern matching. Scala Example : ``````x match { case 1 => "one" case 2 => "two" case _ => "many" } `````` ML Example: ``````case shape of Circle (_, r) => 3.14 * r * r | Square (_, s) => s * s | Triangle (a, b, c) => heron (a, b, c) `````` Scala and ML use `=>` in pattern matching. Scala Example : ``````x match { case 1 => "one" case 2 => "two" case _ => "many" } `````` ML Example: ``````case shape of Circle (_, r) => 3.14 * r * r | Square (_, s) => s * s | Triangle (a, b, c) => heron (a, b, c) `````` Haskell uses it for class constraints : ``````(Eq a) => a -> a -> Bool -- type a should be a member of the Eq typeclass `````` 1 answered Aug 20 '13 at 13:35 Arshdeep Singh 16122 bronze badges Scala and ML use `=>` in pattern matching. Scala Example : ``````x match { case 1 => "one" case 2 => "two" case _ => "many" } `````` ML Example: ``````case shape of Circle (_, r) => 3.14 * r * r | Square (_, s) => s * s | Triangle (a, b, c) => heron (a, b, c) ``````