Posts tagged with functional

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...

How To: Example application with data access in F#

One of my biggest hurdles when starting with F# was how I should structure an actual application. There was documentation for individual libraries and scripts but not so much for app structure this post by Scott Wlaschin is fantastic, but is at a different level than I fully understood at

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...

Foreach and Command Query Separation

In my previous post on getting into higher order functions I wrote about how I've been using higher order functions instead of foreach loops. All of the functions defined in that article were immutable, and had no side effects aside from returning data. In real life though, we're forced to

Continue reading...

Getting into Higher Order Functions

Recently I've developed a love for F# and functional programming principals in general. Something about the way I code in those languages makes the code just seem to work the first time. After a short break from c# I came back to it for a project at work and noticed

Continue reading...
Proudly published with Ghost