FSharpAux


List

Namespace: FSharpAux
Attributes:
[<AutoOpen>]

Functions and values

Function or valueDescription
applyEachPairwise f l
Signature: f:('a -> 'a -> 'b) -> l:'a list -> 'b list
Type parameters: 'a, 'b

Applies function f two each unique compination of items in list

applyEachPairwiseWith f l
Signature: f:('a -> 'a -> 'b) -> l:'a list -> 'b list
Type parameters: 'a, 'b

Applies function f two each unique compination of items in list

countDistinctBy keyf list
Signature: keyf:('T -> 'Key) -> list:'T list -> ('Key * int) list
Type parameters: 'T, 'Key

Applies a keyfunction to each element and counts the amount of each distinct resulting key

cut(input)
Signature: input:'?8629 list -> '?8629 list * '?8629 list
Type parameters: '?8629

Cuts a list into two parts

cutAfterN n input
Signature: n:int -> input:'?8627 list -> '?8627 list * '?8627 list
Type parameters: '?8627

Cuts a list after N and returns both parts

foldi f acc l
Signature: f:(int -> 'State -> 'T -> 'State) -> acc:'State -> l:'T list -> 'State
Type parameters: 'State, 'T

Applies a function to each element and its index of the list, threading an accumulator argument through the computation

groupEquals f input
Signature: f:('a -> 'a -> bool) -> input:'a list -> 'a list list
Type parameters: 'a

Groups elements in list that are b function f

insertAt index newEl input
Signature: index:int -> newEl:'?8641 -> input:'?8641 list -> '?8641 list
Type parameters: '?8641

Inserts an element into a list at a given index (Not recommended list opperation)

removeAt index input
Signature: index:int -> input:'?8639 list -> '?8639 list
Type parameters: '?8639

Removes an element from a list at a given index (Not recommended list opperation)

scanArraySubRight(...)
Signature: f:FSharpFunc<'T,'State,'State> -> arr:'T [] -> start:int -> fin:int -> initState:'State -> 'State list
Type parameters: 'T, 'State
scanReduce f l
Signature: f:('?8620 -> '?8620 -> '?8620) -> l:'?8620 list -> '?8620 list
Type parameters: '?8620
scanReduceBack f l
Signature: f:('?8625 -> '?8625 -> '?8625) -> l:'?8625 list -> '?8625 list
Type parameters: '?8625
Fork me on GitHub