Operators Module
Functions and values
| Function or value |
Description
|
||
Full Usage:
field <-? a
Parameters:
byref<'a voption>
-
Byref field to assign to.
a : 'a
-
Value to wrap; if null, assigns ValueNone.
Modifiers: inline Type parameters: 'a |
|||
Full Usage:
f ^ x
Parameters:
'a -> 'b
-
Function to apply.
x : 'a
-
Argument to pass to the function.
Returns: 'b
Modifiers: inline Type parameters: 'a, 'b |
Reverse application operator:
Example
val result: string
Multiple items
val string: value: 'T -> string -------------------- type string = System.String val raise: exn: System.Exception -> 'T
val sprintf: format: Printf.StringFormat<'T> -> 'T
|
||
Full Usage:
~%x
Parameters:
'a
-
Value whose return is discarded.
Modifiers: inline Type parameters: 'a |
Ignores the return value of an expression. Useful for fluent/chain APIs that return
Example
type 'T list = List<'T>
|
||
Full Usage:
aggregate errors
Parameters:
exn seq
-
Inner exceptions to aggregate.
Returns: 'a
Modifiers: inline Type parameters: 'a |
Throws AggregateException wrapping multiple errors.
|
||
Full Usage:
always x arg2
Parameters:
'a
-
Value to always return.
arg1 : 'b
Returns: 'a
Modifiers: inline Type parameters: 'a, 'b |
Always returns the first argument, ignoring the second.
|
||
Full Usage:
argRange paramName msg
Parameters:
string
-
Name of the parameter.
msg : string
-
Exception message.
Returns: 'a
Modifiers: inline Type parameters: 'a |
Throws ArgumentOutOfRangeException.
|
||
Full Usage:
argRangeVal paramName actualValue msg
Parameters:
string
-
Name of the parameter.
actualValue : obj
-
The out-of-range value.
msg : string
-
Exception message.
Returns: 'a
Modifiers: inline Type parameters: 'a |
Throws ArgumentOutOfRangeException including the actual value.
|
||
Full Usage:
camelCaseToSnakeCase str
Parameters:
string
-
The CamelCase string to convert.
Returns: string
|
Converts a
Example
|
||
Full Usage:
disposed objectName
Parameters:
string
-
Name of the disposed object.
Returns: 'a
Modifiers: inline Type parameters: 'a |
Throws ObjectDisposedException.
|
||
Full Usage:
ecast value
Parameters:
^a
-
Value to convert.
Returns: ^b
Modifiers: inline Type parameters: ^a, ^b |
Explicit cast using
|
||
Full Usage:
icast value
Parameters:
^a
-
Value to convert.
Returns: ^b
Modifiers: inline Type parameters: ^a, ^b |
Implicit cast using
|
||
Full Usage:
inc a
Parameters:
byref<^a>
-
Byref value to increment.
Modifiers: inline Type parameters: ^a, ^a |
Increments a byref numeric value in-place by one.
|
||
Full Usage:
invalidCast msg
Parameters:
string
-
Exception message.
Returns: 'a
Modifiers: inline Type parameters: 'a |
Throws InvalidCastException.
|
||
Full Usage:
invalidCastf fmt
Parameters:
StringFormat<'a, 'b>
-
Printf format string.
Returns: 'a
Modifiers: inline Type parameters: 'a, 'b |
Throws InvalidCastException with a formatted message.
|
||
Full Usage:
invalidOpf fmt
Parameters:
StringFormat<'a, 'b>
-
Printf format string.
Returns: 'a
Modifiers: inline Type parameters: 'a, 'b |
Throws InvalidOperationException with a formatted message.
|
||
Full Usage:
isNotNull v
Parameters:
'T
-
Reference-type value to check.
Returns: bool
Modifiers: inline Type parameters: 'T |
Returns
|
||
|
|||
|
|||
Full Usage:
notImpl msg
Parameters:
string
-
Exception message.
Returns: 'a
Modifiers: inline Type parameters: 'a |
Throws NotImplementedException.
|
||
Full Usage:
notImplf fmt
Parameters:
StringFormat<'a, 'b>
-
Printf format string.
Returns: 'a
Modifiers: inline Type parameters: 'a, 'b |
Throws NotImplementedException with a formatted message.
|
||
Full Usage:
notSupported msg
Parameters:
string
-
Exception message.
Returns: 'a
Modifiers: inline Type parameters: 'a |
Throws NotSupportedException.
|
||
Full Usage:
notSupportedf fmt
Parameters:
StringFormat<'a, 'b>
-
Printf format string.
Returns: 'a
Modifiers: inline Type parameters: 'a, 'b |
Throws NotSupportedException with a formatted message.
|
||
Full Usage:
snakeCaseToCamelCase str
Parameters:
string
-
The snake_case string to convert.
Returns: string
|
Converts a
Example
|
||
Full Usage:
swap f a b
Parameters:
'T2 -> 'T1 -> 'a
-
Function whose arguments are swapped.
a : 'T1
-
Second argument passed to f.
b : 'T2
-
First argument passed to f.
Returns: 'a
Modifiers: inline Type parameters: 'T2, 'T1, 'a |
Swaps the two arguments of a function:
|
||
Full Usage:
tee f v
Parameters:
'T -> unit
-
Side-effect action to apply.
v : 'T
-
Value to pass through.
Returns: 'T
Modifiers: inline Type parameters: 'T |
Applies a side-effect action to a value, then returns the value unchanged. Useful for logging or debugging in a pipeline.
Example
val result: string
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
Multiple items
val string: value: 'T -> string -------------------- type string = System.String |
||
Full Usage:
tee2 f g v
Parameters:
'T -> unit
-
First side-effect action.
g : 'T -> unit
-
Second side-effect action.
v : 'T
-
Value to pass through.
Returns: 'T
Modifiers: inline Type parameters: 'T |
Applies two side-effect actions to a value, then returns the value unchanged.
|
||
Full Usage:
timedOut msg
Parameters:
string
-
Exception message.
Returns: 'a
Modifiers: inline Type parameters: 'a |
Throws TimeoutException.
|
||
Full Usage:
timedOutf fmt
Parameters:
StringFormat<'a, 'b>
-
Printf format string.
Returns: 'a
Modifiers: inline Type parameters: 'a, 'b |
Throws TimeoutException with a formatted message.
|
||
Full Usage:
toAction f
Parameters:
'a -> unit
Returns: Action<'a>
Modifiers: inline Type parameters: 'a |
|||
Full Usage:
toAction2 f
Parameters:
'a -> 'b -> unit
Returns: Action<'a, 'b>
Modifiers: inline Type parameters: 'a, 'b |
Wraps an F# function as a
|
||
Full Usage:
toAction3 f
Parameters:
'a -> 'b -> 'c -> unit
Returns: Action<'a, 'b, 'c>
Modifiers: inline Type parameters: 'a, 'b, 'c |
Wraps an F# function as a
|
||
Full Usage:
ucast a
Parameters:
'a
-
Value to cast.
Returns: 'b
Modifiers: inline Type parameters: 'a, 'b |
Unsafe cast like in C#.
|
||
Full Usage:
uncurry f (a, b)
Parameters:
'a -> 'b -> 'c
-
Curried function to uncurry.
a : 'a
-
First element of the tuple.
b : 'b
-
Second element of the tuple.
Returns: 'c
Modifiers: inline Type parameters: 'a, 'b, 'c |
Uncurries a 2-arg function to accept a tuple.
|
||
Full Usage:
uncurry3 f (a, b, c)
Parameters:
'a -> 'b -> 'c -> 'd
-
Curried function to uncurry.
a : 'a
-
First element of the triple.
b : 'b
-
Second element of the triple.
c : 'c
-
Third element of the triple.
Returns: 'd
Modifiers: inline Type parameters: 'a, 'b, 'c, 'd |
Uncurries a 3-arg function to accept a triple.
|
TDesu.FSharp