Simulate the Yield Statement in Visual Basic Part 1

When working through the project euler problems in visual basic we very quickly run into a limitation of the language, visual basic does not support iterators.  Unfortunately, iterators probably won’t make it into the next version of vb either.  So time to get our hands dirty and roll our own iterator support.

The Great VB vs F# Euler Shootout Problem 1

I’ve been looking for some little programs to work on in order to learn F#.  Thankfully, I stumbled across Dustin Campbell’s blog, which led me to following site.

http://projecteuler.net

It’s really a lot of fun and a great way to learn F#.  Dustin has been showing the solutions in F# and [...]

A Tail of Two Functions Part 2

Last time we watched our elegant map function blow up in our face.  This time we’ll find out how to fix the problem. 

The Tail Instruction

On page 261 of .Net IL Assembler there’s a short blurb about the tail instruction.  I never really understood what the tail call did.  [...]

A Tail of Two Functions Part 1

We’ve been working on a way to stream individual items in a list from function to function.  To get any further on our F# implementation, we’ll have to deal with a problem in the way our map function is written.  Here’s the code.

 

F# Elegance for the VB Proletariat Part 3

Last time we discovered 3 things about writing a map function in Visual Basic.

·         The code is way longer.

F# Elegance for the VB Proletariat Part 2

A great way to learn something new is to map it to something that is already familiar.  Often times mapping the new concept to what you already know forces you to reexamine the way you are doing something.

In part 1 we built ourselves a handy recursive map function using F#.  [...]

F# Elegance for the VB Proletariat Part 1

I’ve been programming Visual Basic for eight years and haven’t really found a reason to switch to another language.  I’m certified in Java, written components in C#, done a website in PHP.  None of these languages offer anything that VB can’t already do.

But when a language comes along that does [...]

Can we please get single line lambda expressions working first?

One of the biggest pains with lambda expressions in Visual Basic is not being able to pass them as parameters to methods that expect an Action(of T).  Here’s a quick example of something you can’t do in VB.

 

Module Module1

Passing state to an AsyncCallback delegate

Last time we looked at a simple example of using an AsyncCallback delegate to perform an asynchronous operation.  We’ll build on this example and show how to pass some state into the callback.

Imports System.Net