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
## Functional Track talks from NDC London 2014 | |
### Wednesday 2014-12-3 | |
* [F-Words - Functional Programming Terms With More Than Four Letters - Calvin Bottoms](http://www.ndcvideos.com/#/app/video/2191) | |
* [Reactive Game Development For The Discerning Hipster - Bodil Stokke](http://www.ndcvideos.com/#/app/video/2221) | |
* [Erlang Patterns Matching Business Needs -- Torben Hoffman](http://www.ndcvideos.com/#/app/video/2211) | |
* [Equivalence Classes, xUnit.net, FsCheck, Property-Based Testing -- Mark Seemann](http://www.ndcvideos.com/#/app/video/2291) | |
* [Functional programming design patterns -- Scott Wlaschin](http://www.ndcvideos.com/#/app/video/2311) | |
* [Write Your Own Compiler in 24 Hours -- Phillip Trelford](http://www.ndcvideos.com/#/app/video/2281) |
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 | |
let letters = "acdegilmnoprstuw" | |
let hash : string -> int64 = Seq.fold (fun acc ch -> acc * 37L + int64 (Seq.findIndex ((=) ch) letters)) 7L | |
let unhash : int64 -> string = | |
Seq.unfold (function | |
| n when n <= 7L -> None | |
| n -> let idx = n % 37L |> int | |
(letters.[idx], n / 37L) |> Some) | |
>> (fun chars -> new String(chars |> Seq.toArray |> Array.rev)) |