Adding my F# implementation