Skip to content

Commit

Permalink
Definition of examineNumber was never used (dotnet#18490)
Browse files Browse the repository at this point in the history
The sample defined a function `examineNumber`, but this function was never used in printing the output of squares and cubes. I believe it is leftover after an older example was changed, and should be removed as it's confusing.
  • Loading branch information
xerxesb authored May 18, 2020
1 parent c9b2ded commit 344cbb2
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions samples/snippets/fsharp/lang-ref-2/snippet5005.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ let (|Cube|_|) (x : int) =
if isNearlyIntegral ((float x) ** ( 1.0 / 3.0)) then Some(x)
else None

let examineNumber x =
match x with
| Cube x -> printfn "%d is a cube" x
| Square x -> printfn "%d is a square" x
| _ -> ()

let findSquareCubes x =
match x with
| Cube x & Square _ -> printfn "%d is a cube and a square" x
Expand Down

0 comments on commit 344cbb2

Please sign in to comment.