This file contains 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
#r "../packages/FSketch/lib/net452/FSketch.dll" | |
#r "../packages/FSketch.Svg/lib/net452/FSketch.Svg.dll" | |
#r "../packages/FSketch.Drawing/lib/net452/FSketch.Drawing.dll" | |
open FSketch | |
open FSketch.Dsl | |
open FSketch.Builder | |
#r "../packages/FSketch.Winforms/lib/net452/FSketch.Winforms.dll" | |
fsi.AddPrintTransformer(fun (shapes:FSketch.Shapes) -> | |
shapes |> FSketch.Frame.FromShapes |> FSketch.Winforms.WinformsDrawer.Draw |> ignore |
This file contains 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
module Document.Core | |
type Emphasis = | Regular | Medium | Strong | |
type TextPart = { Text:string; Emphasis:Emphasis; Style:string option } | |
with static member Regular(text) = { Text=text; Emphasis=Regular; Style=None } | |
static member Medium(text) = { Text=text; Emphasis=Medium; Style=None } | |
static member Strong(text) = { Text=text; Emphasis=Strong; Style=None } | |
type Text = Text of TextPart list | |
with static member Regular(text) = Text([TextPart.Regular(text)]) |
This file contains 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 DifferenceType<'TKey, 'T> = | |
| Added of 'TKey * 'T | |
| Removed of 'TKey * 'T | |
| Modified of 'TKey * 'T * 'T * seq<string * (string * string)> with | |
member this.Key = | |
match this with | |
| Added (key, _) | |
| Removed (key, _) | |
| Modified (key, _, _, _) -> key |
This file contains 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 stringToCharList (s:string) = Seq.toList s | |
let charListToString (chars: char list) = System.String(List.toArray chars) | |
let shiftCharList (charList: char list) = | |
charList // not really shifted | |
let rot13 (s: string) = | |
let charList = stringToCharList s | |
let shiftedCharList = shiftCharList charList | |
charListToString shiftedCharList |
This file contains 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
.assembly ConsoleApp | |
{ | |
} | |
.class public auto ansi abstract sealed beforefieldinit Program | |
extends System.Object | |
{ | |
// Methods | |
.method assembly hidebysig static | |
int32 FibAcc ( |
OlderNewer