Menu

FSharp Expressions

James Hardaker

An FSharp constructor with a private let bound field looks like this

Lambda (x,
Sequential (NewObject (Object),
Sequential (FieldSet (Some (this), x@16, x), Value (<null>))))

what is this?

Define a lambda expression which takes 'x' as its arguments
Create Object of type Object? <- I can only guess that the F# compiler does something else here
Set field 'x16' on 'this' with value 'x'
Null (this is not in the code, it is implied as nothing is returned)

I think there is quite a bit to be inferred from Quoted constructors.
x16 is a name created by the quotation engine. Its on line 16
fyi: Here is an empty constructor

Lambda (unitVar0, Sequential (NewObject (Object), Value (<null>)))


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.