[Home] Module Microsoft.FSharp.Compatibility.List


Compatibility operations on lists.

Values

ValueDescription
[<OCamlCompatibilityAttribute ()>]
val assoc : 'Key -> ('Key * 'T) list -> 'T
Lookup key's data in association list, uses (=) equality. Raise System.IndexOutOfRangeException exception if key not found, in which case you should typically use try_assoc instead.
[<OCamlCompatibilityAttribute ()>]
val assq : 'Key -> ('Key * 'T) list -> 'T
See assoc, but uses the physical equality operator (==) for equality tests
val contains : 'T -> 'T list -> bool
Is an element in the list. Elements are compared using generic equality.
[<OCamlCompatibilityAttribute ("The F# name for this function is 'contains'")>]
val mem : 'T -> 'T list -> bool
Is an element in the list. Elements are compared using generic equality.
[<OCamlCompatibilityAttribute ()>]
val mem_assoc : 'Key -> ('Key * 'T) list -> bool
Does the key have pair in the association list?
[<OCamlCompatibilityAttribute ()>]
val mem_assq : 'Key -> ('Key * 'T) list -> bool
See mem_assoc, but uses the physical equality operator (==) for equality tests.
[<OCamlCompatibilityAttribute ()>]
val memq : 'Key -> 'Key list -> bool
See mem, but uses the physical equality operator (==) for equality tests.
[<OCamlCompatibilityAttribute ()>]
val remove_assoc : 'Key -> ('Key * 'T) list -> ('Key * 'T) list
Remove pair for key from the association list (if it's there).
[<OCamlCompatibilityAttribute ()>]
val remove_assq : 'Key -> ('Key * 'T) list -> ('Key * 'T) list
See remove_assoc, but uses the physical equality operator (==) for equality tests.
[<OCamlCompatibilityAttribute ()>]
val rev_append : 'T list -> 'T list -> 'T list
"rev_append l1 l2" evaluates to "append (rev l1) l2"
[<OCamlCompatibilityAttribute ()>]
val rev_map : ('T -> 'U) -> 'T list -> 'U list
"rev_map f l1" evaluates to "map f (rev l1)"
[<OCamlCompatibilityAttribute ()>]
val rev_map2 : ('T1 -> 'T2 -> 'U) -> 'T1 list -> 'T2 list -> 'U list
"rev_map2 f l1 l2" evaluates to "map2 f (rev l1) (rev l2)"
val scanReduce : ('T -> 'T -> 'T) -> 'T list -> 'T list
Like reduce_left, but return both the intermediary and final results
val scanReduceBack : ('T -> 'T -> 'T) -> 'T list -> 'T list
Like reduce_right, but return both the intermediary and final results
[<OCamlCompatibilityAttribute ()>]
val try_assoc : 'Key -> ('Key * 'T) list -> 'T option
Lookup key's data in association list, uses (=) equality, returning "Some data" or "None".
[<OCamlCompatibilityAttribute ()>]
val try_assq : 'Key -> ('Key * 'T) list -> 'T option
See try_assoc, but uses the physical equality operator (==) for equality tests.

See Also

Microsoft.FSharp.Compatibility


Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16