// (c) Microsoft Corporation 2005-2009. #if INTERNALIZED_POWER_PACK namespace (* internal *) Internal.Utilities #else namespace Microsoft.FSharp.Compatibility #endif open System /// Compatibility operations on lists. module List = /// Like reduce_left, but return both the intermediary and final results val scanReduce : reduction:('T -> 'T -> 'T) -> 'T list -> 'T list /// Like reduce_right, but return both the intermediary and final results val scanReduceBack : reduction:('T -> 'T -> 'T) -> 'T list -> 'T list /// Is an element in the list. Elements are compared using generic equality. val contains: 'T -> 'T list -> bool /// Is an element in the list. Elements are compared using generic equality. [] val mem: 'T -> 'T list -> bool /// 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. [] val assoc: 'Key -> ('Key * 'T) list -> 'T /// Lookup key's data in association list, uses (=) equality, /// returning "Some data" or "None". [] val try_assoc: 'Key -> ('Key * 'T) list -> 'T option /// Does the key have pair in the association list? [] val mem_assoc: 'Key -> ('Key * 'T) list -> bool /// Remove pair for key from the association list (if it's there). [] val remove_assoc: 'Key -> ('Key * 'T) list -> ('Key * 'T) list /// See assoc, but uses the physical equality operator (==) for equality tests [] val assq: 'Key -> ('Key * 'T) list -> 'T /// See try_assoc, but uses the physical equality operator (==) for equality tests. [] val try_assq: 'Key -> ('Key * 'T) list -> 'T option /// See mem_assoc, but uses the physical equality operator (==) for equality tests. [] val mem_assq: 'Key -> ('Key * 'T) list -> bool /// See remove_assoc, but uses the physical equality operator (==) for equality tests. [] val remove_assq: 'Key -> ('Key * 'T) list -> ('Key * 'T) list /// See mem, but uses the physical equality operator (==) for equality tests. [] val memq: 'Key -> 'Key list -> bool /// Return true if the list is not empty. [] val nonempty: 'Key list -> bool /// "rev_map f l1" evaluates to "map f (rev l1)" [] val rev_map: mapping:('T -> 'U) -> 'T list -> 'U list /// "rev_map2 f l1 l2" evaluates to "map2 f (rev l1) (rev l2)" [] val rev_map2: mapping:('T1 -> 'T2 -> 'U) -> 'T1 list -> 'T2 list -> 'U list /// "rev_append l1 l2" evaluates to "append (rev l1) l2" [] val rev_append: 'T list -> 'T list -> 'T list [] val scan1_left : reduction:('T -> 'T -> 'T) -> 'T list -> 'T list [] val scan1_right : reduction:('T -> 'T -> 'T) -> 'T list -> 'T list [] val tryfind_indexi: predicate:(int -> 'T -> bool) -> list:'T list -> int option [] val find_indexi: predicate:(int -> 'T -> bool) -> list:'T list -> int