Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type AverageTempType = {Date: System.Datetime; Year: int64; Month: int64; AverageTemp: float}
- type DailyTempType = {Date: System.Datetime; Year: int64; Month: int64; Day: int64; DailyTemp: float}
- let MatchLoop =
- for i in DailyData do
- for j in AverageData do
- if (i.Year = j.Year && i.Month = j.Month)
- then printfn "%A %A %A %A %A" i.Year i.Month i.Day i.DailyTemp j.Average
- else printfn "NOMATCH"
- let MatchPattern (x:DailyTempType) (y:AverageTempType) =
- match (x,y) with
- |(x,y) when (x.Year = y.Year && x.Month = y.Month) ->
- printfn "match"
- |(_,_) -> printfn "nomatch"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement