Flix (programming language): Difference between revisions

Content deleted Content added
Line 43:
<syntaxhighlight lang="Scala">
/// Computes the area of the given shape using pattern matching and basic arithmetic.
def area(s: Shape): Int = match s with {
case Circle(r) => 3 * (r * r)
case Square(w) => w * w