My F# implementation

I clean and refactor my code a little bit :-)