on 3/21/2015 9:29 AM
This blog post explains five F#-specific features who simplify and stabilize the implementation of vector algebra: Custom operators Inlining Units of Measure Type inference Automatic generalization We will use these features to define an infix dot product operator who is compile-time type-safe and generic.   Dot Product Operator Implementation let inline (.*) xs ys = Seq.map2 (*) xs ys |> Seq.sum The above line of code does not contain any type annotations. However, thanks to the F# compiler's built-in [...]
>> Read the full article on www.blogs.sigristsoftware.com
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper