Skip to content

Instantly share code, notes, and snippets.

Steve Goguen sgoguen

Block or report user

Report or block sgoguen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sgoguen / movie-list.txt
Created Aug 16, 2019
Movies for Robert
View movie-list.txt
Full Metal Jacket
sgoguen / movie-list.txt
Created Aug 16, 2019
Movies for Robert
View movie-list.txt
Full Metal Jacket
View ingredient-reader.fsx
let items = [
"1 1/2 cup onions, diced"
"1/4 tsp coriander"
"1 medium carrot"
"1.5 oz olive oil"
"two lemons"
let tokenize(s) = [ for t in Regex.Split(s, "\\b") do
sgoguen / wheel.fsx
Created Feb 13, 2019
Wheel of Fortune Solver
View wheel.fsx
// First, clone the word list project here:
// Then save this file in the same folder and run!
open System.IO
// Ok... Here's how it works...
// First, we load all the words from the Moby text fil
let allTheWords = File.ReadAllLines("words.txt")
sgoguen / LoadServer.fsx
Created Jan 24, 2019
How to cancel an agent
View LoadServer.fsx
// 1. Create a project and add Steego.FsPad as a Nuget dependency
// 2. Build your project and set this folder to your output
#I "bin/Debug/net461/"
#r "FSharp.Core.dll"
#r "Suave.dll"
#r "Steego.FsPad.dll"
module Watcher =
View treemap.fs
module TreeMaps
type Map<'k,'v> =
| Map of ('v -> 'k -> 'v)
type ShallowMap<'k,'v,'c> =
| ShallowMap of value:'v * lookup:('k -> 'v -> 'c)
sgoguen / PathReflection.fs
Created Feb 5, 2018
FSharp - Functions as Paths
View PathReflection.fs
open Microsoft.FSharp.Reflection
let rec listTypes(t:Type) =
if FSharpType.IsFunction(t) then
let(a,b) = FSharpType.GetFunctionElements(t)
yield a
if FSharpType.IsFunction(b) then
yield! listTypes(b)

Keybase proof

I hereby claim:

  • I am sgoguen on github.
  • I am sgoguen ( on keybase.
  • I have a public key ASB7lHbtpeTVKV_POAjX-YXpSjuk3i7VMIMeAKJ0cFCrOgo

To claim this, I am signing this object:

View livehub.cs
void Main() {
string url = "http://localhost:8080";
using (WebApp.Start(url, Configuration)) {
sgoguen / enumInvalidInstances.fs
Created Oct 17, 2017
Using FsCheck to Enumerate Invalid Instances
View enumInvalidInstances.fs
// In this example, we're using FsCheck in an unorthodox way.
// Typically you tell FsCheck to look for something that violates
// your rule. Here, we're reappropriating FsCheck's fuzz testing
// capabilities to enumerate everything that has been deemed
// "valid" to see if it's actually valid to help us figure out the rules.
type Money = decimal
type CouponType = FreeMail | FreeSide
type PaymentOption =
You can’t perform that action at this time.