Posts tagged with monads

How to: Example F# application with functional flow

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

Continue reading...

An FSharp monad TIL experience

I'm going about my business dealing with option types thinking I finally have a good handle on monad usage within F# when suddenly I receive the following error. This expression was expected to have type int but here has type 'a option My first thought is that I've neglected to

Continue reading...
Proudly published with Ghost