F# basic implementation