Sign In
MSDN Blogs
Microsoft Blog Images
More ...
Common Tasks
Blog Home
Email Blog Author
RSS for comments
RSS for posts
Atom
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
.NET Futures
Bing
C#
C++\CLI
Code Quality
Data Structures
Design Patterns
F#
Freebase
FsLex
FsYacc
Immutable
JSON
Lex
MEF
MSBuild
Multicore
Neat Samples
OData
Pages
Performance
PowerPack
Puzzle
Xml
Yacc
Archives
Archives
June 2010
(1)
May 2010
(3)
March 2010
(7)
February 2010
(1)
November 2009
(1)
September 2008
(2)
August 2008
(4)
May 2008
(2)
April 2008
(1)
December 2007
(1)
November 2007
(1)
October 2007
(6)
September 2007
(8)
August 2007
(2)
July 2007
(3)
June 2007
(1)
May 2007
(4)
March 2007
(1)
March 2006
(2)
November 2005
(1)
October 2005
(1)
September 2005
(2)
August 2005
(1)
July 2005
(1)
May 2005
(7)
April 2005
(4)
February 2005
(1)
January 2005
(1)
November 2004
(2)
October 2004
(3)
September 2004
(5)
Blog - Title
September, 2007
MSDN Blogs
>
Sharp Things
>
September, 2007
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Sharp Things
Adventures in F#--Lazy Like a Fox
Posted
over 5 years ago
by
Jomo Fisher
3
Comments
Jomo Fisher--This is the next part of the open-notebook series documenting my exploration of F#. Today, I'm looking at the lazy keyword. When an F# function is invoked its value is immediately evaluated. F# does not do lazy evaluation by default. However...
Sharp Things
Adventures in F#--Corecursion
Posted
over 5 years ago
by
Jomo Fisher
6
Comments
Jomo Fisher--In a prior post I touched on recursion in F#. One of the comments was about mutually recursive functions. The example given was, let f1 a do print a f2 a let f2 a do print a f1 a f1 1 It turns out that this F# doesn't compile because F# scoping...
Sharp Things
Adventures in F#--Tail Recursion in Three Languages
Posted
over 5 years ago
by
Jomo Fisher
12
Comments
Jomo Fisher—Here’s the F# I'm looking at today: #light let rec f n = do printf "%d\n" n f (n+1) f 1 This defines a recursive function 'f' that takes a value 'n' as a parameter. This function prints the value of n to the console and then calls itself with...
Sharp Things
Adventures in F#--Discriminated Unions
Posted
over 5 years ago
by
Jomo Fisher
7
Comments
Jomo Fisher-- Easily my favorite feature of F# so far is the combination of discriminated union and pattern matching. Together, these allow you to concisely represent a complex language-like data structure and operations over that structure. We used this...
Sharp Things
Adventures in F#--Poking Tuples with a Stick
Posted
over 5 years ago
by
Jomo Fisher
3
Comments
Jomo Fisher--In a comment on my bloglet about type inference in F# John Harrop suggested I try: let f (a,b)=(b,a) Which, under Reflector, gives this equivalent in C#: public static Tuple<U, T> f<T, U>(T a, U b) { return new...
Sharp Things
Adventures in F#--Function Type Inference
Posted
over 5 years ago
by
Jomo Fisher
6
Comments
Consider this F#: let Reverse a b = b a This means: given a and b (whatever they may be) call b as a function with 'a' as the argument. When I compile this and look at it under reflector I get: public static U ( ,Microsoft.FSharp.Core.FastFunc...
Sharp Things
Adventures in F#--Probing Type Inference
Posted
over 5 years ago
by
Jomo Fisher
12
Comments
Jomo Fisher--I was curious about type inference in F# and I wondered what would happen if there was really no way for the compiler to infer a type. Consider this function which takes a value and just returns it: let func n = n Like last time , I compiled...
Sharp Things
Adventures in F#--The Lay of the Land
Posted
over 5 years ago
by
Jomo Fisher
5
Comments
Jomo Fisher--I'm taking some time now to better understand F#. Right now, I understand the concept of functional code and have some narrow but deep experience by way of the work we did on LINQ for C# 3.0. My goal is to understand F# as well as I understand...
Page 1 of 1 (8 items)