Skip to content

Instantly share code, notes, and snippets.

#r @"nuget: Unquote"
open Swensen.Unquote
let rec combinationsRecursive list =
match list with
|x :: xs ->
let withX = xs |> List.map (fun y -> (x,y))
let others = combinationsRecursive xs
List.append withX others
| _ -> []
@prGmtc
prGmtc / chess.fsx
Created December 6, 2016 14:40
Advent of Code 2016 - Day 6 part 2 - F#
open System
open System.Security.Cryptography
let hasher = MD5.Create()
let hash (word : string) =
let bytes = System.Text.Encoding.ASCII.GetBytes(word)
let hash = hasher.ComputeHash(bytes)
BitConverter.ToString(hash).Replace("-", "")
let indexes =