TopLevelFunctions

Namespace: Chimayo.Ssis.Common

Useful top level functions

Functions and values

Function or valueDescription
appendSeqToList
Signature: 'a list -> seq<'a> -> 'a list
Type parameters: 'a

Appends a sequence to a list one element at a time (watch out for ordering implications)

cond trueBranch falseBranch test
Signature: trueBranch:'?9795 -> falseBranch:'?9795 -> test:bool -> '?9795
Type parameters: '?9795

if 'test' then 'trueBranch' else 'falseBranch'

curry f a b
Signature: f:('?9785 * '?9786 -> '?9787) -> a:'?9785 -> b:'?9786 -> '?9787
Type parameters: '?9785, '?9786, '?9787

Curry a function taking a paired argument

defer x arg2
Signature: x:'?9815 -> '?9816 -> '?9815
Type parameters: '?9815, '?9816

delays execution of a function, swallowing any input

makeList element
Signature: element:'?9818 -> '?9818 list
Type parameters: '?9818

constructs a list of a single element

optionMapToList fn
Signature: fn:('?9806 -> '?9807) -> '?9806 option -> '?9807 list
Type parameters: '?9806, '?9807

Takes an option and returns a list of zero or one elements with the element transformed

optionOrDefault
Signature: 'a -> 'a option -> 'a
Type parameters: 'a

Takes an option and returns its value or a default

optionOrDefaultMap mapper def o
Signature: mapper:('?9801 -> '?9802) -> def:'?9802 -> o:'?9801 option -> '?9802
Type parameters: '?9801, '?9802

Takes an option and returns a transformed value or a default value

reverseInvoke arg fn
Signature: arg:'?9820 -> fn:('?9820 -> '?9821) -> '?9821
Type parameters: '?9820, '?9821

reverses syntax for function invocation

stringCompareInvariant a b
Signature: a:String -> b:string -> bool

System.String.Equals(InvariantCulture)

stringCompareInvariantIgnoreCase a b
Signature: a:String -> b:string -> bool

System.String.Equals(InvariantCultureIgnoreCase)

stringInt32ToEnum value
Signature: value:string -> ^?9809
Type parameters: ^?9809

Converts an integer string to an enum member

stringToEnum value
Signature: value:string -> 'a
Type parameters: 'a

Converts a string to an enum member

swap f x y
Signature: f:('?9781 -> '?9782 -> '?9783) -> x:'?9782 -> y:'?9781 -> '?9783
Type parameters: '?9781, '?9782, '?9783

Reverse first two arguments to a curried function

swapAndFoldList (...)
Signature: argReversedFolder:('?9798 -> '?9799 -> '?9799) -> items:'?9798 list -> state:'?9799 -> '?9799
Type parameters: '?9798, '?9799

List.fold with several arguments reordered to support chaining

throwIfTrue test exceptionMessage
Signature: test:bool -> exceptionMessage:string -> unit

if 'test' then failwith 'exceptionMessage'

toInt32String value
Signature: value:^?9813 -> string
Type parameters: ^?9813

converts a value to an integer string

uncurry f (a, b)
Signature: f:('?9789 -> '?9790 -> '?9791) -> (a:'?9789 * b:'?9790) -> '?9791
Type parameters: '?9789, '?9790, '?9791

Uncurry a function taking two consecutive curried arguments