Skip to content

Instantly share code, notes, and snippets.

@Lakret
Created June 24, 2014 22:57
Show Gist options
  • Save Lakret/2b9eae8bec55f87df96d to your computer and use it in GitHub Desktop.
Save Lakret/2b9eae8bec55f87df96d to your computer and use it in GitHub Desktop.
let hyperfactorial k =
[k .. -1 .. 1]
|> Seq.map (fun x -> Seq.init x (fun _ -> x))
|> Seq.fold (fun acc ss -> acc * (Seq.reduce (*) ss)) 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment