Skip to content

Instantly share code, notes, and snippets.

@nmfisher
Created February 10, 2019 01:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmfisher/c901254c1612bdef8fda406658690c84 to your computer and use it in GitHub Desktop.
Save nmfisher/c901254c1612bdef8fda406658690c84 to your computer and use it in GitHub Desktop.
Casting F# function to C# Func
let L2Norm:Func<double[],double[],float> = Func<double[],double[],float>(fun (x:double[]) (y:double[]) ->
let mutable dist = 0.
for i in 0..x.Length-1 do
dist <- (x.[i] - y.[i]) * (x.[i] - y.[i]);
dist)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment