FSharpx.Extras


Prelude

Namespace: FSharpx.Functional

Functions and values

Function or valueDescription
( ^ )
Signature: ('?11430 -> '?11431) -> '?11430 -> '?11431
Type parameters: '?11430, '?11431

Sequencing operator like Haskell's ($). Has better precedence than (<|) due to the first character used in the symbol.

CompiledName: op_Concatenate

( |>! ) x fn
Signature: x:'?11438 -> fn:('?11438 -> '?11439) -> '?11438
Type parameters: '?11438, '?11439

Custom operator for tee: Given a value, apply a function to it, ignore the result, then return the original value.

CompiledName: op_BarGreaterBang

curry f a b
Signature: f:('d * 'e -> 'f) -> a:'d -> b:'e -> 'f
Type parameters: 'd, 'e, 'f

Transforms an uncurried function to a curried function.

curry3 f a b c
Signature: f:('?11373 * '?11374 * '?11375 -> '?11376) -> a:'?11373 -> b:'?11374 -> c:'?11375 -> '?11376
Type parameters: '?11373, '?11374, '?11375, '?11376

Transforms an uncurried function to a triple-curried function.

fix f x
Signature: f:(('d -> 'e) -> 'd -> 'e) -> x:'d -> 'e
Type parameters: 'd, 'e

Fixed point combinator.

fix2 f x y
Signature: f:(('?11421 -> '?11422 -> '?11423) -> '?11421 -> '?11422 -> '?11423) -> x:'?11421 -> y:'?11422 -> '?11423
Type parameters: '?11421, '?11422, '?11423

Fixed point combinator.

fix3 f x y z
Signature: f:(('?11425 -> '?11426 -> '?11427 -> '?11428) -> '?11425 -> '?11426 -> '?11427 -> '?11428) -> x:'?11425 -> y:'?11426 -> z:'?11427 -> '?11428
Type parameters: '?11425, '?11426, '?11427, '?11428

Fixed point combinator.

flip f a b
Signature: f:('d -> 'e -> 'f) -> a:'e -> b:'d -> 'f
Type parameters: 'd, 'e, 'f

Transforms a function by flipping the order of its arguments.

flip3 f a b c
Signature: f:('?11354 -> '?11355 -> '?11356 -> '?11357) -> a:'?11355 -> b:'?11356 -> c:'?11354 -> '?11357
Type parameters: '?11354, '?11355, '?11356, '?11357

Transforms a function by flipping the order of its arguments.

flip4 f a b c d
Signature: f:('?11359 -> '?11360 -> '?11361 -> '?11362 -> '?11363) -> a:'?11360 -> b:'?11361 -> c:'?11362 -> d:'?11359 -> '?11363
Type parameters: '?11359, '?11360, '?11361, '?11362, '?11363

Transforms a function by flipping the order of its arguments.

konst a arg2
Signature: a:'?11386 -> '?11387 -> '?11386
Type parameters: '?11386, '?11387

Given a value, creates a function with one ignored argument which returns the value.

konst2 a arg2 arg3
Signature: a:'?11389 -> '?11390 -> '?11391 -> '?11389
Type parameters: '?11389, '?11390, '?11391

Given a value, creates a function with two ignored arguments which returns the value.

reraise' e
Signature: e:exn -> 'T
Type parameters: 'T

Rethrows an exception. This can be used even outside of try-with block. The exception object (stacktrace, etc) is not changed.

reraiseWith f e
Signature: f:(exn -> unit) -> e:exn -> 'T
Type parameters: 'T

Rethrows an exception, but bebore that applies a function on it. This can be used even outside of try-with block. The exception object (stacktrace, etc) is not changed.

swap (a, b)
Signature: (a:'?11383 * b:'?11384) -> '?11384 * '?11383
Type parameters: '?11383, '?11384

Swap the elements of a pair.

tee fn x
Signature: fn:('?11435 -> '?11436) -> x:'?11435 -> '?11435
Type parameters: '?11435, '?11436

Given a value, apply a function to it, ignore the result, then return the original value.

toOption (arg1, arg2)
Signature: (bool * '?11445) -> '?11445 option
Type parameters: '?11445
tryWith f x
Signature: f:('?11447 -> bool * '?11448) -> x:'?11447 -> '?11448 option
Type parameters: '?11447, '?11448
tuple2 a b
Signature: a:'?11393 -> b:'?11394 -> '?11393 * '?11394
Type parameters: '?11393, '?11394

Creates a pair

tuple3 a b c
Signature: a:'?11396 -> b:'?11397 -> c:'?11398 -> '?11396 * '?11397 * '?11398
Type parameters: '?11396, '?11397, '?11398

Creates a 3-tuple

tuple4 a b c d
Signature: a:'?11400 -> b:'?11401 -> c:'?11402 -> d:'?11403 -> '?11400 * '?11401 * '?11402 * '?11403
Type parameters: '?11400, '?11401, '?11402, '?11403

Creates a 4-tuple

tuple5 a b c d e
Signature: a:'?11405 -> b:'?11406 -> c:'?11407 -> d:'?11408 -> e:'?11409 -> '?11405 * '?11406 * '?11407 * '?11408 * '?11409
Type parameters: '?11405, '?11406, '?11407, '?11408, '?11409

Creates a 5-tuple

tuple6 a b c d e f
Signature: a:'?11411 -> b:'?11412 -> c:'?11413 -> d:'?11414 -> e:'?11415 -> f:'?11416 -> '?11411 * '?11412 * '?11413 * '?11414 * '?11415 * '?11416
Type parameters: '?11411, '?11412, '?11413, '?11414, '?11415, '?11416

Creates a 6-tuple

uncurry f (a, b)
Signature: f:('?11369 -> '?11370 -> '?11371) -> (a:'?11369 * b:'?11370) -> '?11371
Type parameters: '?11369, '?11370, '?11371

Transforms an uncurried function to a curried function.

uncurry3 f (a, b, c)
Signature: f:('?11378 -> '?11379 -> '?11380 -> '?11381) -> (a:'?11378 * b:'?11379 * c:'?11380) -> '?11381
Type parameters: '?11378, '?11379, '?11380, '?11381

Transforms an uncurried function to a triple-curried function.

undefined
Signature: 'T
Type parameters: 'T

Bottom value

Type extensions

Type extensionDescription
parse
Signature: string -> bool option

CompiledName: Boolean.get_parse.Static

parse
Signature: string -> bool option

CompiledName: Boolean.get_parse.Static

parse(x)
Signature: x:string -> byte option

CompiledName: Byte.parse.Static

parse(x)
Signature: x:string -> sbyte option

CompiledName: SByte.parse.Static

parse(x)
Signature: x:string -> uint16 option

CompiledName: UInt16.parse.Static

parse(x)
Signature: x:string -> int16 option

CompiledName: Int16.parse.Static

parse(x)
Signature: x:string -> uint32 option

CompiledName: UInt32.parse.Static

parse(x)
Signature: x:string -> int option

CompiledName: Int32.parse.Static

parse(x)
Signature: x:string -> uint64 option

CompiledName: UInt64.parse.Static

parse(x)
Signature: x:string -> int64 option

CompiledName: Int64.parse.Static

parse(x)
Signature: x:string -> decimal option

CompiledName: Decimal.parse.Static

parse(x)
Signature: x:string -> float32 option

CompiledName: Single.parse.Static

parse(x)
Signature: x:string -> float option

CompiledName: Double.parse.Static

parse(x)
Signature: x:string -> DateTime option

CompiledName: DateTime.parse.Static

parse(x)
Signature: x:string -> DateTimeOffset option

CompiledName: DateTimeOffset.parse.Static

parseExact(formats x)
Signature: (formats:string []) -> x:string -> DateTime option

CompiledName: DateTime.parseExact.Static

parseExact(formats x)
Signature: (formats:string []) -> x:string -> DateTimeOffset option

CompiledName: DateTimeOffset.parseExact.Static

parseExactWithOptions(...)
Signature: style:DateTimeStyles -> provider:IFormatProvider -> (formats:string []) -> x:string -> DateTime option

CompiledName: DateTime.parseExactWithOptions.Static

parseExactWithOptions(...)
Signature: style:DateTimeStyles -> provider:IFormatProvider -> (formats:string []) -> x:string -> DateTimeOffset option

CompiledName: DateTimeOffset.parseExactWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> byte option

CompiledName: Byte.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> sbyte option

CompiledName: SByte.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> uint16 option

CompiledName: UInt16.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> int16 option

CompiledName: Int16.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> uint32 option

CompiledName: UInt32.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> int option

CompiledName: Int32.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> uint64 option

CompiledName: UInt64.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> int64 option

CompiledName: Int64.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> decimal option

CompiledName: Decimal.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> float32 option

CompiledName: Single.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:NumberStyles -> provider:IFormatProvider -> x:string -> float option

CompiledName: Double.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:DateTimeStyles -> provider:IFormatProvider -> x:string -> DateTime option

CompiledName: DateTime.parseWithOptions.Static

parseWithOptions(style provider x)
Signature: style:DateTimeStyles -> provider:IFormatProvider -> x:string -> DateTimeOffset option

CompiledName: DateTimeOffset.parseWithOptions.Static

Active patterns

Active patternDescription
( |Boolean|_| )
Signature: string -> bool option

CompiledName: |Boolean|_|

( |Byte|_| ) arg00
Signature: arg00:string -> byte option

CompiledName: |Byte|_|

( |DateTime|_| ) arg00
Signature: arg00:string -> DateTime option

CompiledName: |DateTime|_|

( |DateTimeOffset|_| ) arg00
Signature: arg00:string -> DateTimeOffset option

CompiledName: |DateTimeOffset|_|

( |Decimal|_| ) arg00
Signature: arg00:string -> decimal option

CompiledName: |Decimal|_|

( |Double|_| ) arg00
Signature: arg00:string -> float option

CompiledName: |Double|_|

( |Int16|_| ) arg00
Signature: arg00:string -> int16 option

CompiledName: |Int16|_|

( |Int32|_| ) arg00
Signature: arg00:string -> int option

CompiledName: |Int32|_|

( |Int64|_| ) arg00
Signature: arg00:string -> int64 option

CompiledName: |Int64|_|

( |SByte|_| ) arg00
Signature: arg00:string -> sbyte option

CompiledName: |SByte|_|

( |Single|_| ) arg00
Signature: arg00:string -> float32 option

CompiledName: |Single|_|

( |UInt16|_| ) arg00
Signature: arg00:string -> uint16 option

CompiledName: |UInt16|_|

( |UInt32|_| ) arg00
Signature: arg00:string -> uint32 option

CompiledName: |UInt32|_|

( |UInt64|_| ) arg00
Signature: arg00:string -> uint64 option

CompiledName: |UInt64|_|

Fork me on GitHub