on 7/17/2015 5:56 AM
In a previous post on F# data access I dropped a hint about a functional way of handling invalid arguments. The code in question looked like this. let insertLocation city state = if state |> String.length >= 2 then DataAccess.createLocation city state else raise (System.ArgumentException("Not a valid State")) If you're new to the functional paradigm you may not see any issue with this code. To explain why this isn't an ideal solution let's first look at a simpler function. let divide x[...]
>> Read the full article on reidev275.azurewebsites.net
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