Skip to content

Instantly share code, notes, and snippets.

View kiwidev's full-sized avatar

Mark Young kiwidev

  • Microsoft
  • New Zealand
View GitHub Profile
@Porges
Porges / syntax.cs
Last active August 29, 2015 13:57
some syntactical ideas for C#
class Example
{
// "init-anywhere" syntax (along the lines of Haskell)
[Implemented(true)]
Foo Do()
{
var x = new Foo { bar = 1 }; // <- currently available
return x { bar = 3 }; // <- proposed (note that this mutates unlike Haskell)
}
System.IO.Directory.SetCurrentDirectory __SOURCE_DIRECTORY__
// The following DLLs were fetched using NuGet
#r @".\packages\FsCheck.0.9.2.0\lib\net40-Client\FsCheck.dll"
#r @".\packages\NUnit.2.6.3\lib\nunit.framework.dll"
open FsCheck
open NUnit.Framework
// ======================================