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 @"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 | |
| _ -> [] |
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
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 = |