val printfn : format:Printf.TextWriterFormat<'T> -> 'T
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn
Multiple items type EntryPointAttribute = inherit Attribute new : unit -> EntryPointAttribute
Full name: Microsoft.FSharp.Core.EntryPointAttribute
-------------------- new : unit -> EntryPointAttribute
val main : args:string [] -> int
Full name: fsharp.main
val args : string []
val b : int
Full name: Fsharp.b
val mutable a : int
Full name: Fsharp.a
val c : int
Full name: Fsharp.c
val d : int
val v1 : int
Full name: Fsharp.v1
val v2 : char
Full name: Fsharp.v2
val add : x:int -> y:int -> int
Full name: Fsharp.add
val x : int
val y : int
val add' : (int -> int -> int)
Full name: Fsharp.add'
val add'' : x:int * y:int -> int
Full name: Fsharp.add''
val add1 : (int -> int)
Full name: Fsharp.add1
val ( x^2 ) : x:float -> float
Full name: Fsharp.( x^2 )
val x : float
val sqrt : _arg1:float -> float option
Full name: Fsharp.sqrt
type Double = struct member CompareTo : value:obj -> int + 1 overload member Equals : obj:obj -> bool + 1 overload member GetHashCode : unit -> int member GetTypeCode : unit -> TypeCode member ToString : unit -> string + 3 overloads static val MinValue : float static val MaxValue : float static val Epsilon : float static val NegativeInfinity : float static val PositiveInfinity : float ... end
Full name: System.Double
Double.IsNaN(d: float) : bool
Double.IsInfinity(d: float) : bool
union case Option.None: Option<'T>
union case Option.Some: Value: 'T -> Option<'T>
type Math = static val PI : float static val E : float static member Abs : value:sbyte -> sbyte + 6 overloads static member Acos : d:float -> float static member Asin : d:float -> float static member Atan : d:float -> float static member Atan2 : y:float * x:float -> float static member BigMul : a:int * b:int -> int64 static member Ceiling : d:decimal -> decimal + 1 overload static member Cos : d:float -> float ...
Full name: System.Math
Math.Sqrt(d: float) : float
val mult : x:int -> y:int -> int
Full name: Fsharp.mult
Multiple items val int : value:'T -> int (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.int
-------------------- type int = int32
Full name: Microsoft.FSharp.Core.int
-------------------- type int<'Measure> = int
Full name: Microsoft.FSharp.Core.int<_>
val mult' : x:int -> y:int -> int
Full name: Fsharp.mult'
val add : a:int -> b:int -> int
Full name: Fsharp.add
val a : int
val b : int
val add' : a:'a -> b:'b -> 'c (requires member ( + ))
Full name: Fsharp.add'
val a : 'a (requires member ( + ))
val b : 'b (requires member ( + ))
val succ' : x:int -> int
Full name: Fsharp.succ'
module LanguagePrimitives
from Microsoft.FSharp.Core
val GenericOne<'T (requires member get_One)> : 'T (requires member get_One)
Full name: Microsoft.FSharp.Core.LanguagePrimitives.GenericOne
val succ : x:'a -> 'c (requires member ( + ) and member get_One)
Full name: Fsharp.succ
val x : 'a (requires member ( + ) and member get_One)
val fibonacci : _arg1:int -> int
Full name: Fsharp.fibonacci
val n : int
val squared : x:int -> int
Full name: Fsharp.squared
val addTwo : x:int -> int
Full name: Fsharp.addTwo
val squareThenAdd : (int -> int)
Full name: Fsharp.squareThenAdd
val addThenSquare : (int -> int)
Full name: Fsharp.addThenSquare
val squareThenAdd' : (int -> int)
Full name: Fsharp.squareThenAdd'
val addThenSquare' : (int -> int)
Full name: Fsharp.addThenSquare'
type Foo = static member Bar : ?c:int -> int
Full name: Fsharp.Foo
static member Foo.Bar : ?c:int -> int
Full name: Fsharp.Foo.Bar
val c : int option
val c : int
val defaultArg : arg:'T option -> defaultValue:'T -> 'T
Full name: Microsoft.FSharp.Core.Operators.defaultArg
val t : float * string
Full name: Fsharp.t
val f : float
Full name: Fsharp.f
val fst : tuple:('T1 * 'T2) -> 'T1
Full name: Microsoft.FSharp.Core.Operators.fst
val s : string
Full name: Fsharp.s
val snd : tuple:('T1 * 'T2) -> 'T2
Full name: Microsoft.FSharp.Core.Operators.snd
val t' : float * string * (int * DateTime)
Full name: Fsharp.t'
Multiple items type DateTime = struct new : ticks:int64 -> DateTime + 10 overloads member Add : value:TimeSpan -> DateTime member AddDays : value:float -> DateTime member AddHours : value:float -> DateTime member AddMilliseconds : value:float -> DateTime member AddMinutes : value:float -> DateTime member AddMonths : months:int -> DateTime member AddSeconds : value:float -> DateTime member AddTicks : value:int64 -> DateTime member AddYears : value:int -> DateTime ... end
Full name: System.DateTime
-------------------- DateTime() (+0 other overloads) DateTime(ticks: int64) : unit (+0 other overloads) DateTime(ticks: int64, kind: DateTimeKind) : unit (+0 other overloads) DateTime(year: int, month: int, day: int) : unit (+0 other overloads) DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : unit (+0 other overloads) DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : unit (+0 other overloads) DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : unit (+0 other overloads) DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : unit (+0 other overloads) DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : unit (+0 other overloads) DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : unit (+0 other overloads)
property DateTime.UtcNow: DateTime
val f' : float
Full name: Fsharp.f'
val s' : string
Full name: Fsharp.s'
val i : int
Full name: Fsharp.i
val d : DateTime
Full name: Fsharp.d
val f'' : float
Full name: Fsharp.f''
val s'' : string
Full name: Fsharp.s''
val c' : int * DateTime
Full name: Fsharp.c'
val mutable out : int
Full name: Fsharp.out
val success : bool
Full name: Fsharp.success
type Int32 = struct member CompareTo : value:obj -> int + 1 overload member Equals : obj:obj -> bool + 1 overload member GetHashCode : unit -> int member GetTypeCode : unit -> TypeCode member ToString : unit -> string + 3 overloads static val MaxValue : int static val MinValue : int static member Parse : s:string -> int + 3 overloads static member TryParse : s:string * result:int -> bool + 1 overload end
type Person = {FirstName: string; LastName: string; DoB: DateTime; DoD: DateTime option;}
Full name: Fsharp.Person
Person.FirstName: string
Person.LastName: string
Person.DoB: DateTime
Person.DoD: DateTime option
type 'T option = Option<'T>
Full name: Microsoft.FSharp.Core.option<_>
val wolfgang : Person
Full name: Fsharp.wolfgang
val bizet : Person
Full name: Fsharp.bizet
property DateTime.Year: int
val passedAwayWolfgang : Person
Full name: Fsharp.passedAwayWolfgang
type DU = | Case1 | Case2 of string | Case3 of int * int | Case4 of x: float * y: float | Case5 of inception: DU * DateTime
Full name: Fsharp.DU
union case DU.Case1: DU
union case DU.Case2: string -> DU
union case DU.Case3: int * int -> DU
union case DU.Case4: x: float * y: float -> DU
argument x : float
Multiple items val float : value:'T -> float (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.float
-------------------- type float = Double
Full name: Microsoft.FSharp.Core.float
-------------------- type float<'Measure> = float
Full name: Microsoft.FSharp.Core.float<_>
argument y : float
union case DU.Case5: inception: DU * DateTime -> DU
type SingleCase = | SC of string
Full name: Fsharp.SingleCase
union case SingleCase.SC: string -> SingleCase
type SingleGen<'a> = | C of 'a
Full name: Fsharp.SingleGen<_>
union case SingleGen.C: 'a -> SingleGen<'a>
type Opt<'a> = | Nothing | Something of 'a
Full name: Fsharp.Opt<_>
union case Opt.Nothing: Opt<'a>
union case Opt.Something: 'a -> Opt<'a>
val opt : int option
Full name: Fsharp.opt
module Option
from Microsoft.FSharp.Core
val isNone : option:'T option -> bool
Full name: Microsoft.FSharp.Core.Option.isNone
val get : option:'T option -> 'T
Full name: Microsoft.FSharp.Core.Option.get
type BinTree<'a> = | Node of left: BinTree<'a> * value: 'a * right: BinTree<'a> | Leaf of value: 'a member InOrder : seq<'a>
Full name: Fsharp.BinTree<_>
union case BinTree.Node: left: BinTree<'a> * value: 'a * right: BinTree<'a> -> BinTree<'a>
union case BinTree.Leaf: value: 'a -> BinTree<'a>
val tree : BinTree<'a>
member BinTree.InOrder : seq<'a>
Full name: Fsharp.BinTree`1.InOrder
Multiple items val seq : sequence:seq<'T> -> seq<'T>
Full name: Microsoft.FSharp.Core.Operators.seq
-------------------- type seq<'T> = Collections.Generic.IEnumerable<'T>
Full name: Microsoft.FSharp.Collections.seq<_>
val value : 'a
val l : BinTree<'a>
val v : 'a
val r : BinTree<'a>
property BinTree.InOrder: seq<'a>
val tree : BinTree<string>
Full name: Fsharp.tree
val flattened : string list
Full name: Fsharp.flattened
property BinTree.InOrder: seq<string>
module Seq
from Microsoft.FSharp.Collections
val toList : source:seq<'T> -> 'T list
Full name: Microsoft.FSharp.Collections.Seq.toList
val foo : string
Full name: Fsharp.foo
type obj = Object
Full name: Microsoft.FSharp.Core.obj
Multiple items type NoEqualityAttribute = inherit Attribute new : unit -> NoEqualityAttribute
Full name: Microsoft.FSharp.Core.NoEqualityAttribute
-------------------- new : unit -> NoEqualityAttribute
Multiple items type NoComparisonAttribute = inherit Attribute new : unit -> NoComparisonAttribute
Full name: Microsoft.FSharp.Core.NoComparisonAttribute
-------------------- new : unit -> NoComparisonAttribute
type CanNotCompare<'a> = | CNC of 'a
Full name: Fsharp.CanNotCompare<_>
union case CanNotCompare.CNC: 'a -> CanNotCompare<'a>
val toA : unit -> string
Full name: Fsharp.toA
val toB : unit -> string
Full name: Fsharp.toB
val x : int list
Full name: Fsharp.x
val y : int list
Full name: Fsharp.y
val evenSquares : (int * int) list
Full name: Fsharp.evenSquares
val evenSquares' : (int * int) list
Full name: Fsharp.evenSquares'
Multiple items module List
from Microsoft.FSharp.Collections
-------------------- type List<'T> = | ( [] ) | ( :: ) of Head: 'T * Tail: 'T list interface IEnumerable interface IEnumerable<'T> member GetSlice : startIndex:int option * endIndex:int option -> 'T list member Head : 'T member IsEmpty : bool member Item : index:int -> 'T with get member Length : int member Tail : 'T list static member Cons : head:'T * tail:'T list -> 'T list static member Empty : 'T list
Full name: Microsoft.FSharp.Collections.List<_>
val filter : predicate:('T -> bool) -> list:'T list -> 'T list
Full name: Microsoft.FSharp.Collections.List.filter
val map : mapping:('T -> 'U) -> list:'T list -> 'U list
Full name: Microsoft.FSharp.Collections.Seq.unfold
val n1 : obj
val n2 : obj
val item : index:int -> source:seq<'T> -> 'T
Full name: Microsoft.FSharp.Collections.Seq.item
val arr : int []
Full name: Fsharp.arr
Multiple items type ArgumentException = inherit SystemException new : unit -> ArgumentException + 4 overloads member GetObjectData : info:SerializationInfo * context:StreamingContext -> unit member Message : string member ParamName : string
Full name: System.ArgumentException
-------------------- ArgumentException() : unit ArgumentException(message: string) : unit ArgumentException(message: string, innerException: exn) : unit ArgumentException(message: string, paramName: string) : unit ArgumentException(message: string, paramName: string, innerException: exn) : unit
val ex : ArgumentException
property ArgumentException.Message: string
Multiple items type InvalidOperationException = inherit SystemException new : unit -> InvalidOperationException + 2 overloads
Full name: System.InvalidOperationException
-------------------- InvalidOperationException() : unit InvalidOperationException(message: string) : unit InvalidOperationException(message: string, innerException: exn) : unit
val ex : exn
val sprintf : format:Printf.StringFormat<'T> -> 'T
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.sprintf
property Exception.Message: string
val z : int
val xs : int list
val e : float
val greet : _arg1:Person -> string
Full name: Fsharp.greet
val ln : string
val d : DateTime
val fn : string
val box : value:'T -> obj
Full name: Microsoft.FSharp.Core.Operators.box
val typeof<'T> : Type
Full name: Microsoft.FSharp.Core.Operators.typeof
Multiple items val double : value:'T -> double (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.double
-------------------- type double = Double
Full name: Microsoft.FSharp.Core.double
val d : double
active recognizer Even: int -> Choice<unit,unit>
Full name: Fsharp.( |Even|Odd| )
active recognizer Odd: int -> Choice<unit,unit>
Full name: Fsharp.( |Even|Odd| )
val color : Drawing.Color
namespace System.Drawing
type Color = struct member A : byte member B : byte member Equals : obj:obj -> bool member G : byte member GetBrightness : unit -> float32 member GetHashCode : unit -> int member GetHue : unit -> float32 member GetSaturation : unit -> float32 member IsEmpty : bool member IsKnownColor : bool ... end
Full name: System.Drawing.Color
property Drawing.Color.R: byte
property Drawing.Color.G: byte
property Drawing.Color.B: byte
val printRGB : _arg1:Drawing.Color -> unit
Full name: Fsharp.printRGB
active recognizer RGB: Drawing.Color -> byte * byte * byte
Full name: Fsharp.( |RGB| )
val r : byte
val g : byte
val b : byte
val printf : format:Printf.TextWriterFormat<'T> -> 'T
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printf
val input : string
namespace System.Text
namespace System.Text.RegularExpressions
val regex : string
val m : Match
Multiple items type Regex = new : pattern:string -> Regex + 2 overloads member GetGroupNames : unit -> string[] member GetGroupNumbers : unit -> int[] member GroupNameFromNumber : i:int -> string member GroupNumberFromName : name:string -> int member IsMatch : input:string -> bool + 1 overload member Match : input:string -> Match + 2 overloads member MatchTimeout : TimeSpan member Matches : input:string -> MatchCollection + 1 overload member Options : RegexOptions ...
Full name: System.Text.RegularExpressions.Regex
-------------------- Regex(pattern: string) : unit Regex(pattern: string, options: RegexOptions) : unit Regex(pattern: string, options: RegexOptions, matchTimeout: TimeSpan) : unit
type Match = inherit Group member Groups : GroupCollection member NextMatch : unit -> Match member Result : replacement:string -> string static member Empty : Match static member Synchronized : inner:Match -> Match
Full name: System.Text.RegularExpressions.Match
property Group.Success: bool
val g : Group
property Match.Groups: GroupCollection
property Capture.Value: string
active recognizer Integer: string -> int option
Full name: Fsharp.( |Integer|_| )
active recognizer Parse: string -> string -> string list option
Full name: Fsharp.( |Parse|_| )
val m : int
val s : string
type unit = Unit
Full name: Microsoft.FSharp.Core.unit
Multiple items val seq : sequence:seq<'T> -> seq<'T>
Full name: Microsoft.FSharp.Core.Operators.seq
-------------------- type seq<'T> = System.Collections.Generic.IEnumerable<'T>
Full name: Microsoft.FSharp.Collections.seq<_>
type exn = System.Exception
Full name: Microsoft.FSharp.Core.exn
type bool = System.Boolean
Full name: Microsoft.FSharp.Core.bool
namespace System.Threading
val res : Choice<string,exn>
Full name: Fsharp.res
val async : AsyncBuilder
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.async
val u : Uri
Multiple items type Uri = new : uriString:string -> Uri + 5 overloads member AbsolutePath : string member AbsoluteUri : string member Authority : string member DnsSafeHost : string member Equals : comparand:obj -> bool member Fragment : string member GetComponents : components:UriComponents * format:UriFormat -> string member GetHashCode : unit -> int member GetLeftPart : part:UriPartial -> string ...
Full name: System.Uri
-------------------- Uri(uriString: string) : unit Uri(uriString: string, uriKind: UriKind) : unit Uri(baseUri: Uri, relativeUri: string) : unit Uri(baseUri: Uri, relativeUri: Uri) : unit
val ctx : SynchronizationContext
Multiple items type SynchronizationContext = new : unit -> SynchronizationContext member CreateCopy : unit -> SynchronizationContext member IsWaitNotificationRequired : unit -> bool member OperationCompleted : unit -> unit member OperationStarted : unit -> unit member Post : d:SendOrPostCallback * state:obj -> unit member Send : d:SendOrPostCallback * state:obj -> unit member Wait : waitHandles:nativeint[] * waitAll:bool * millisecondsTimeout:int -> int static member Current : SynchronizationContext static member SetSynchronizationContext : syncContext:SynchronizationContext -> unit
Full name: System.Threading.SynchronizationContext
-------------------- SynchronizationContext() : unit
Multiple items type Async static member AsBeginEnd : computation:('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit) static member AwaitEvent : event:IEvent<'Del,'T> * ?cancelAction:(unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate) static member AwaitIAsyncResult : iar:IAsyncResult * ?millisecondsTimeout:int -> Async<bool> static member AwaitTask : task:Task -> Async<unit> static member AwaitTask : task:Task<'T> -> Async<'T> static member AwaitWaitHandle : waitHandle:WaitHandle * ?millisecondsTimeout:int -> Async<bool> static member CancelDefaultToken : unit -> unit static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>> static member FromBeginEnd : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T> static member FromBeginEnd : arg:'Arg1 * beginAction:('Arg1 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T> static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T> static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T> static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> static member Ignore : computation:Async<'T> -> Async<unit> static member OnCancel : interruption:(unit -> unit) -> Async<IDisposable> static member Parallel : computations:seq<Async<'T>> -> Async<'T []> static member RunSynchronously : computation:Async<'T> * ?timeout:int * ?cancellationToken:CancellationToken -> 'T static member Sleep : millisecondsDueTime:int -> Async<unit> static member Start : computation:Async<unit> * ?cancellationToken:CancellationToken -> unit static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions * ?cancellationToken:CancellationToken -> Task<'T> static member StartChild : computation:Async<'T> * ?millisecondsTimeout:int -> Async<Async<'T>> static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Async<Task<'T>> static member StartImmediate : computation:Async<unit> * ?cancellationToken:CancellationToken -> unit static member StartWithContinuations : computation:Async<'T> * continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * ?cancellationToken:CancellationToken -> unit static member SwitchToContext : syncContext:SynchronizationContext -> Async<unit> static member SwitchToNewThread : unit -> Async<unit> static member SwitchToThreadPool : unit -> Async<unit> static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T> static member CancellationToken : Async<CancellationToken> static member DefaultCancellationToken : CancellationToken
Full name: Microsoft.FSharp.Control.Async
-------------------- type Async<'T>
Full name: Microsoft.FSharp.Control.Async<_>
static member Async.SwitchToThreadPool : unit -> Async<unit>
val client : Net.WebClient
namespace System.Net
Multiple items type WebClient = inherit Component new : unit -> WebClient member AllowReadStreamBuffering : bool with get, set member AllowWriteStreamBuffering : bool with get, set member BaseAddress : string with get, set member CachePolicy : RequestCachePolicy with get, set member CancelAsync : unit -> unit member Credentials : ICredentials with get, set member DownloadData : address:string -> byte[] + 1 overload member DownloadDataAsync : address:Uri -> unit + 1 overload member DownloadDataTaskAsync : address:string -> Task<byte[]> + 1 overload ...
Full name: System.Net.WebClient
-------------------- Net.WebClient() : unit
val b : byte []
member Net.WebClient.AsyncDownloadData : address:Uri -> Async<byte []>
type Encoding = member BodyName : string member Clone : unit -> obj member CodePage : int member DecoderFallback : DecoderFallback with get, set member EncoderFallback : EncoderFallback with get, set member EncodingName : string member Equals : value:obj -> bool member GetByteCount : chars:char[] -> int + 3 overloads member GetBytes : chars:char[] -> byte[] + 5 overloads member GetCharCount : bytes:byte[] -> int + 2 overloads ...
union case Choice.Choice1Of2: 'T1 -> Choice<'T1,'T2>
val r : string
union case Choice.Choice2Of2: 'T2 -> Choice<'T1,'T2>
Multiple items val exn : exn
-------------------- type exn = Exception
Full name: Microsoft.FSharp.Core.exn
namespace FSharp.Configuration
Multiple items type Config = inherit Root new : unit -> Config event Changed : EventHandler member Error : IEvent<Exception> member Meetup : Meetup_Type nested type Meetup_Type
Full name: Fsharp.Config
-------------------- Config() : Config
type YamlConfig = inherit Root member Error : IEvent<Exception>
Full name: FSharp.Configuration.YamlConfig
<summary>Statically typed YAML config.</summary> <param name='FilePath'>Path to YAML file.</param> <param name='ReadOnly'>Whether the resulting properties will be read-only or not.</param> <param name='YamlText'>Yaml as text. Mutually exclusive with FilePath parameter.</param>
<summary>Typed representation of a XML file.</summary>
<param name='Sample'>Location of a XML sample file or a string containing a sample XML document.</param>
<param name='SampleIsList'>If true, the children of the root in the sample document represent individual samples for the inference.</param>
<param name='Global'>If true, the inference unifies all XML elements with the same name.</param>
<param name='Culture'>The culture used for parsing numbers and dates. Defaults to the invariant culture.</param>
<param name='Encoding'>The encoding used to read the sample. You can specify either the character set name or the codepage number. Defaults to UTF8 for files, and to ISO-8859-1 the for HTTP requests, unless `charset` is specified in the `Content-Type` response header.</param>
<param name='ResolutionFolder'>A directory that is used when resolving relative file references (at design time and in hosted execution).</param>
<param name='EmbeddedResource'>When specified, the type provider first attempts to load the sample from the specified resource
(e.g. 'MyCompany.MyAssembly, resource_name.xml'). This is useful when exposing types generated by the type provider.</param>
<param name='InferTypesFromValues'>If true, turns on additional type inference from values.
(e.g. type inference infers string values such as "123" as ints and values constrained to 0 and 1 as booleans. The XmlProvider also infers string values as JSON.)</param>
type Nil = inherit XmlElement new : nil: Option<bool> * value: Option<decimal> -> Nil + 1 overload member Nil : Option<bool> member Value : Option<decimal>
Full name: FSharp.Data.XmlProvider,Sample="sampleMessages.xml",SampleIsList="True".Nil
val missingNil : XmlProvider<...>.MissingNil option
Full name: Fsharp.missingNil
type MissingNil = inherit XmlElement new : nil: Option<bool> * value: Option<int> -> MissingNil + 1 overload member Nil : Option<bool> member Value : Option<int>
Full name: FSharp.Data.XmlProvider,Sample="sampleMessages.xml",SampleIsList="True".MissingNil
variables, loops, traditional objects, state, side effects
order of things matters
indentation matters
+ (almost) all of .NET
Why 1/3
FP is easier to write, easier to read, easier to test, and easier to understand. [...]
you have found it anything but easy. All those [...] are anything but easy. [...] But that’s just a problem with familiarity.
Once you are familiar with those concepts – and it doesn’t take long to develop that familiarity – programming gets a lot easier.
This means that the programmer has to juggle fewer balls in the air at the same time.
There’s less to remember. Less to keep track of. And therefore the code is much simpler to write, read, understand, and test. [...]
The bottom line is this:
Functional programming is important. You should learn it.
We built all of these features because we think that they are better than the previous alternative. [...]
We are a big believer in enabling the use of fewer lines, fewer characters to specify a given concept or operation,
and the reducing needless repetition. That’s what most of these new features enable.
Nullable differs in that it results in more reliable code. Every app or library that uses nullable is less likely to crash in production.
Software is too complicated for human minds to see the mistakes that a compiler can.
A common theme across these features is that they reduce noise and increase signal when you are looking at your code in a code editor.
More important aspects should now pop.
letaddab=a+b// val add : a: int -> b : int -> intletinlineadd'ab=a+b// val inline add' :// a: ^a -> b: ^b -> ^c// when ( ^a or ^b) : (static member ( + ) : ^a * ^b -> ^c)
1: 2: 3: 4: 5: 6: 7: 8:
letsucc'x=x+LanguagePrimitives.GenericOne// val succ' : x:int -> intletinlinesuccx=x+LanguagePrimitives.GenericOne// val inline succ :// x: ^a -> ^c// when ( ^a or ^b) : (static member ( + ) : ^a * ^b -> ^c) and// ^b : (static member get_One : -> ^b)
Recursion naive
1: 2: 3: 4: 5: 6:
letrecfibonacci=function
| 0->0
| 1->1
| n->fibonacci(n-1) +fibonacci(n-2)
fibonacci6// val it : int = 8
Composition
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
letsquaredx=x*xletaddTwox=x+2letsquareThenAdd=squared>>addTwo// (f >> g) x ≡ (g ∘ f)(x) ≡ g(f(x))letaddThenSquare=addTwo>>squaredletsquareThenAdd'=addTwo<<squared// (f << g) x ≡ (f ∘ g)(x) ≡ f(g(x))letaddThenSquare'=squared<<addTwosquareThenAdd3// val it : int = 11addThenSquare3// val it : int = 25squareThenAdd'3// val it : int = 11addThenSquare'3// val it : int = 25
Functions vs. Methods
Function
Method
powerful type inference
more easily discoverable
higher order functions
may reduce parameter list length
no hidden dependency
overloading *
curried vs. tupled
Curried
Tupled
partial application
named parameters
function composition, pipes
optional parameters
less noise
overloading *
"legacy" .NET interaction
Optional parameters and shadowing
1: 2: 3: 4:
typeFoo=staticmemberBar(?c) =letc=defaultArgc1// val c : int option42*c
Tuples
1: 2: 3:
lett= (1.0, "Foo") // val t : float * stringletf=fsttlets=sndt
error FS0001: The type '(unit -> string)' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface
Further customization
StructuralComparison
records, tuples, DUs
CustomComparison
IComparable, CompareTo(o)
NoComparison
good choice for most types
ComparisonConditionalOn
comparison support depends on generic argument(s)
Lists
1: 2:
letx=3:: [1; 4] @ [1; 5; 9] // val x : int list = [3;1;4;1;5;9] lety= [1..2..5] // val y : int list = [1;3;5]
warning FS0025: Incomplete pattern matches on this expression. For example, the value '...' may indicate a case not covered by the pattern(s).
warning FS0026: This rule will never be matched
warning FS0067: This type test or downcast will always hold
Active patterns
Complete
let (|Identifer1|Identifier2|...|) arguments = expression
Partition
1: 2: 3: 4: 5:
let (|Even|Odd|) x=ifx%2=0thenEvenelseOddmatch7with
| Even->"||"
| Odd->"~~"
Decompose
1: 2: 3: 4: 5:
let (|RGB|) (color:System.Drawing.Color) =
(color.R, color.G, color.B)
letprintRGB=functionRGB(r, g, b) ->printf"(R:%i, G:%i, B:%i)"rgb
An F# type provider is a component that provides types, properties, and methods for use in your program.
[...]
Writing these types manually is very time-consuming and difficult to maintain.
A common alternative is to use a code generator which adds files to your project
[...] Visual F# docs
var timeout =12;
Thread.Sleep(timeout);
// Correct? Order of magnitude too long / short?
1: 2: 3: 4: 5: 6: 7: 8:
[<Measure>] types
[<Measure>]
typems=staticmemberperSecond=1000.0<ms/s>lettimeout=12.0<s>timeout*ms.perSecond// val it : float<ms> = 12000.0
1: 2: 3: 4: 5: 6: 7: 8: 9:
openMicrosoft.FSharp.Data.UnitSystems.SI.UnitSymbolsmoduleSymbols=letdistance=1.0<m>lettime=2.0<s>letspeed=distance/timeletacceleration=speed/timeletmass=5.0<kg>letforce:float<N>=mass*speed/time// kg * m / s^2
1: 2: 3: 4: 5: 6: 7: 8: 9:
openMicrosoft.FSharp.Data.UnitSystems.SI.UnitNamesmoduleNames=letdistance=1.0<metre>lettime=2.0<second>letspeed=distance/timeletacceleration=speed/timeletmass=5.0<kilogram>letforce:float<newton>=mass*speed/time// kg * m / s^2