Created
February 10, 2019 01:16
-
-
Save nmfisher/c901254c1612bdef8fda406658690c84 to your computer and use it in GitHub Desktop.
Casting F# function to C# Func
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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