Saturday, January 02, 2010 8:33 AM bart

LINQSQO v4.0 and MinLINQ v1.0 Now Available for Download

Introduced in my previous blog post on The Essence of LINQ – MinLINQ, the first release of this project is now available for reference at the LINQSQO CodePlex website at Compared to the write-up over here in my previous post, there are a few small differences and caveats:

  • Only FEnumerable functionality is available currently; the FObservable dual may follow later.
  • Option<T> has been renamed to Maybe<T>, to be CLS compliant and avoid clashes with the VB keyword.
  • Some operators are not provided, in particular GroupBy, GroupJoin and Join. They’re left as an exercise.
  • A few operator implementations are categorized as “cheaters” since they roundtrip through System.Linq.
  • Don’t nag about performance. The MinLINQ code base is by no means optimal and so be it.
  • Very few System.Interactive operators are included since those often require extra foundations (such as concurrency).

A few highlights:

  • FEnumerable.Essentials.cs is where the fun starts. Here the three primitives – Ana, Bind and Cata – form the ABC of LINQ.
  • There’s a Naturals() constructor function generating an infinite sequence of natural numbers, used in operators that use indexes.
  • OrderBy and ThenBy are supported through roundtripping to System.Linq with a handy trick to keep track of IOrderedEnumerable<T>.
  • As a sample, I’ve included Luke Hoban’s LINQified RayTracer with AsFEnumerable and AsEnumerable roundtripping. It works just fine.
  • Creating an architectural diagram in Visual Studio 2010 yields the following result (not meant to zoomed in), where I’ve used the following colors:
    • Green = Ana
    • Blue = Bind
    • Red = Cata


Obviously, all sorts of warnings apply. People familiar to my blog adventures will know this already, but just in case:

// This project is meant as an illustration of how an academically satifying layering
// of a LINQ to Objects implementation can be realized using monadic concepts and only
// three primitives: anamorphism, bind and catamorphism.
// The code in this project is not meant to be used in production and no guarantees are
// made about its functionality. Use it for academic stimulation purposes only. To use
// LINQ for real, use System.Linq in .NET 3.5 or higher.
// All of the source code may be used in presentations of LINQ or for other educational
// purposes, but references to and the blog post referred
// to above - "The Essence of LINQ - MinLINQ" - are required.

Either way, if you find LINQ interesting and can stand some “brain pain of the highest quality” (a Twitter quote by dahlbyk), this will likely be something for you. | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Filed under: ,


# re: LINQSQO v4.0 and MinLINQ v1.0 Now Available for Download

Saturday, January 02, 2010 8:43 AM by Tom Kirby-Green


I just wanted to extend my thanks for your recent series on EnumerableEx. It feels like you taken over the role that Wes used to perform in the early days of LINQ. I can't thank you enough for the high quality diagramming that accompanies your writing. I don't know where you find time to do this dude - but frankly I would *pay* for material like your blog. So a big tip of the hat and I hope your stuff finds the audience it so richly deserves.



# The Morning Brew - Chris Alcock &raquo; The Morning Brew #509

Monday, January 04, 2010 12:13 AM by The Morning Brew - Chris Alcock » The Morning Brew #509

Pingback from  The Morning Brew - Chris Alcock  &raquo; The Morning Brew #509

# Cure a penile yeast infection

Thursday, November 20, 2014 5:14 PM by Cure a penile yeast infection

LINQSQO v4.0 and MinLINQ v1.0 Now Available for Download - B# .NET Blog