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 Microsoft.FSharp.Linq.Query | |
query <@ seq { for c in db.Customers do yield c.CompanyName } @> |
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
type 'a SimpleType= F of (int ->'a-> 'a) | |
let get a = F(fun req -> id) | |
[<GeneralizableValue>] | |
let oops2<'T> : SimpleType<'T> = get "" |
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
let (|HasValue|Null|) (x:System.Nullable<_>) = | |
if x.HasValue then | |
HasValue (x.Value) | |
else | |
Null | |
let f x = | |
match x with | |
| HasValue v -> v + 1 | |
| Null -> 0 |