Created
December 12, 2015 20:15
-
-
Save ygrenzinger/b7f33edfa919635e888d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.IO | |
type MyRecord = | |
{ IP : string | |
MAC : string | |
FriendlyName : string | |
ID : int } | |
let IsMatchByName record name = | |
match record with | |
| { FriendlyName = nameFound; ID = id; IP = ip } when nameFound = name -> Some((id,ip)) | |
| _ -> None | |
let checkmatch input = | |
match input with | |
| Some((x, y)) -> printfn "%A" x | |
| None -> printfn "%A" "Sorry no match" | |
[<EntryPoint>] | |
let main argv = | |
let input = Console.ReadLine() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment