... prop.MyProp
print prop.MyProp
print prop.MyProp
The results of the previous example, when compiled and executed, are as follows:
213 749 149 2
72659 845 2
3 347 46691
It is also possible to declare abstract properties. ... s.reposition (point (40 ,40 )))
moveShapes()
main()
Circle, with x = 10 and y = 10
Square, with x = 30 and y = 30
Circle, with x = 40 and y = 40
Square, with x = 40 a...
... 60# Thor)
The eXPeRT’s VOIce
®
In .neT
Robert Pickering
Foreword by Don Syme
Foundations of
F#
BOOks fOR PROfessIOnals By PROfessIOnals
®
Foundations of F#
Dear Reader,
I wrote this book because ... http://www.microsoft.com/downloads/details.
Chapter 10 aspx?FamilyId=10CC 340 B-F857-4A 14- 83F5-
25634C3BF 043 &displaylang=en
SDK for .NET Framework 3.0 Chapter 8, http://www....
... instructions.
CHAPTER 3 ■ FUNCTIONAL PROGRAMMING
44
7575Ch03.qxp 4/ 27/07 12:59 PM Page 44
Lists
F
#
l
ists
a
re simple collection types that are built into F#. An F# list can be an
e
mpty list
,
repre-
sented ... PROGRAMMING
49
7575Ch03.qxp 4/ 27/07 12:59 PM Page 49
Pattern matching has a couple of other uses within F#, but I have not yet covered in detail
t
he types on whic...
... another nice feature of F# when interoperating
with non -F# libraries. .NET APIs often use a .NET construct called
delegates, which are concep-
tually a kind of function value. F# functions will ... messages))
temp
CHAPTER 4 ■ IMPERATIVE PROGRAMMING
74
7575Ch 04. qxp 4/ 27/07 1:00 PM Page 74
■Caution The previous sample will not work in the F# interactive console, fsi, bec...
... is
set
CHAPTER 7 ■ THE F# LIBRARIES
149
7575Ch07.qxp 4/ 27/07 1:03 PM Page 149
The Microsoft.FSharp.Control.IEvent Module
You can think of an event in F# as a collection of functions that can be ... most useful.
The Microsoft.FSharp.Math Namespace
The Microsoft.FSharp.Math namespace is designed to enable F# to ensure that the F# libraries
include definitions of some of the...
... available on the Internet to help you do
this. A good resource is the NetFx3 WPF site (
http://wpf.netfx3.com) and of course the WPF
section of MSDN (
http://msdn2.microsoft.com/en-us/netframework/aa663326.aspx).
Summary
This ... shows the results of a little CSS magic.
Figure 8-10. A web page that takes full advantage of HTML and CSS
CHAPTER 8 ■ USER INTERFACES
1 94
7575Ch08.qxp 4/...
... tree:
type Expr =
| Ident of string
| Val of System.Double
| Multi of Expr * Expr
| Div of Expr * Expr
| Plus of Expr * Expr
| Minus of Expr * Expr
The tree consists of just one type because it ... ignore
The results of this example, when executed (on the day of this writing), are as follows:
0. <b> ;F#& lt;/b>
http://research.microsoft.com/fsharp/fsharp.aspx
A .NET...
... 6,932 7,608 14, 835 84, 823 799,788
Compiled via
8,65 856 8 54 1,007 2,369 15,871 151,602
delegate
Compiled 1,112 1 ,40 9 2 ,46 3 16,895 151,135 1,500 ,43 7 14, 869,692
F
r
om
T
able 11 -4 and Figure ... INTEROPERATION
336
7575Ch13.qxp 4/ 27/07 1:08 PM Page 336
The F# Tool Suite and .NET
Programming Tools
This chapter will be a little different from most of the chapters in this book...