let (|EQUILATERAL|_|) (lengths) =
        match(lengths) with
        | [len1;len2;len3] -> if (len1=len2) && (len3 = len2)
        | _ -> None

let (|ISOSCELES|_|) (lengths) = None
    match(lengths) with
    | [len1;len2;len3] -> (len1 = len3 && len1 <> len2) ||
                          (len2 = len3 && len1 <> len2) ||
                          (len1 = len2 && len1 <> len3)
    | _ -> false

let (|SCALENE|_|) (lengths) = None
    match(lengths) with
    | [len1;len2;len3] -> (len1 <> len2) && (len1 <> len3) &&
                          (len2 <> len3)
    | _ -> false

let GetTriangleType(lengths) =
    match(lengths) with
    | EQUILATERAL lengths -> printf "The triangle is a Equalateral"
    | ISOSCELES lengths -> printf "The triangle is a isosceles"
    | SCALENE lengths -> printf "The triangle is a scalene"
    | _ -> printf "The triangle type is unknown"