Below you will find pages that utilize the taxonomy term “F#”
November 6, 2014
Ring probabilities in F#
A few months back I took a look at Elixir. More recently I’ve been exploring F# and I’m very pleased with the experience so far. Here is the ring probabilities algorithm implemented using F#. It’s unlikely that I will ever use Elixir again because having a powerful static type system provided by F# at my disposal is just too good.
let rec calcStateProbs (prob: float, i: int, currProbs: float [], newProbs: float []) = if i < 0 then newProbs else let maxIndex = currProbs.