Including entire record when pattern matching records

You mean this?

let find_steve = function
| { id; name } as user when id = "3" or name = "Steve" -> Some user
| _ -> None
1 Like