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 Domain = interface end | |
type Projection<'R> = | |
abstract member source : Table<'R> | |
and Table<'R> = inherit Projection<'R> | |
and Table<'R, 'K> = | |
inherit Table<('R * 'K)> | |
abstract member row : 'R | |
abstract member key : 'K | |
type proj<'R> = Projection<'R> |
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
//custom type | |
type SomeType(v) = member x.V = v | |
[<AutoOpen>] | |
module Aux1 = | |
//custom type that can carry measure | |
[<MeasureAnnotatedAbbreviation>] | |
type SomeType<[<Measure>] 'm>(v) = | |
member x.V = v |
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
namespace TODOList | |
open WebSharper | |
open WebSharper.JavaScript | |
open WebSharper.JQuery | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Client | |
[<JavaScript>] | |
module Code = |
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
namespace TODOList | |
open WebSharper | |
open WebSharper.JavaScript | |
open WebSharper.JQuery | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Client | |
[<JavaScript>] | |
module Code = |
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
[12:34:33] *** drs1005 would like to add you on Skype | |
Hi Василий Кириченко, I'd like to add you as a contact. This is Don Syme *** | |
[12:35:04] *** Василий Кириченко has shared contact details with drs1005. *** | |
[15:16:00] drs1005: hey got a moment? | |
[15:16:41] Василий Кириченко: hi, yep | |
[15:16:50] drs1005: I'd like to screen share, I'll call then we can do that. | |
[15:16:55] *** Call to Василий Кириченко *** | |
[15:17:39] Василий Кириченко: I don't have microphone here at work | |
[15:17:44] drs1005: ok, I'llscreen share |
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 inline min (array:_[]) = | |
let mutable acc = array.[0] | |
for i = 1 to array.Length - 1 do | |
let curr = array.[i] | |
if curr < acc then | |
acc <- curr | |
acc | |
let min2 (array:_[]) = |
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
// This F# language suggestion wants a way to name collections of constraints: | |
// http://fslang.uservoice.com/forums/245727-f-language/suggestions/8509687-add-constraints-as-a-language-construct | |
// | |
// This is a type alias X<T> = T, so X<int> = int etc. | |
type X<'T> = 'T | |
// This is a type alias X<T> = T which adds a constraint | |
type WithStruct<'T when 'T : struct> = 'T |
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 Point = | |
struct | |
val X: float | |
val Y: float | |
new(x: float, y: float) = { X = x; Y = y } | |
new(x: float) = new Point(x, 3.0) | |
end | |
Point(3.0) |
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 Point = | |
struct | |
val X: float | |
[<DefaultValue>] val mutable Y: float | |
new(x: float) = { X = x } | |
end | |
let mutable p = Point(3.0) | |
p.Y <- 4.0 |
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 Animal() = class end | |
type Dog() = inherit Animal() | |
let feed (animals: seq<Animal>) = () | |
feed [ Dog(); Animal() ] |