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
View anagram.fs
/// <summary>
/// Builds a map where the keys are word signatures and
/// each value is the list of words that share that signature.
/// The signature of a word is simply a string containing
/// the word's letters, sorted. Thus "dog" and "god" will
/// both have the signature "dgo", and the entry in the map
/// with that key will be those two words.
/// This let's us quickly find anagrams
/// </summary>
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)) {
You can’t perform that action at this time.