Skip to content

Instantly share code, notes, and snippets.

// Rather than use [<DefaultValue>], define a default record.
type MyRecord = {
field1 : int
field2 : int
}
let defaultRecord1 = { field1 = 0; field2 = 0 }
let defaultRecord2 = { field1 = 1; field2 = 25 }
// Use the with keyword to populate only a few chosen fields
namespace MyNamespace
type IMyInterface =
abstract GetValue: unit -> string
type MyRecord =
{ MyField1: int
MyField2: string }
interface IMyInterface with
member x.GetValue() = x.MyField2
@lessismore1
lessismore1 / 01_SayHello.fsx
Created March 9, 2018 16:27 — forked from akimboyko/01_SayHello.fsx
Samples from "Actor-based Concurrency with F# and Akka.NET" http://bit.ly/FSharpAkkaNET
#time "on"
#load "Bootstrap.fsx"
open System
open Akka.Actor
open Akka.Configuration
open Akka.FSharp
open Akka.TestKit
// #Using Actor