Searching functions.
| Function or value | Description | ||
| 
                
              
                  Full Usage: 
                   mapfilter f lParameters: 
 'a -> 'b- 
                      The input function.l : 'a list- 
                      The input list.Returns: 'b listThe list of successful application's results. | 
 
 Example
 Multiple items val string: value: 'T -> string -------------------- type string = System.String val failwith: message: string -> 'TEvaluates to ["2"; "4"].Example
 Multiple items val string: value: 'T -> string -------------------- type string = System.String val failwith: message: string -> 'TEvaluates to []. | ||
| 
                
              
                  Full Usage: 
                   maximize f lParameters: 
 'a -> 'b- 
                      The input function.l : 'a list- 
                      The input list.Returns: 'aThe element of the list that maximises the function. | |||
| 
                
              
                  Full Usage: 
                   minimize f lParameters: 
 'a -> 'b- 
                      The input function.l : 'a list- 
                      The input list.Returns: 'aThe element of the list that minimizes the function. | |||
| 
                
              
                  Full Usage: 
                   optimize ord f lParameters: 
 'a -> 'a -> bool- 
                      The order that defines whether to maximize or minimize.f : 'b -> 'a- 
                      The input function.l : 'b list- 
                      The input list.Returns: 'bThe element of the list that optimizes the function. | Used to define maximize and minimize. 
 
 Example
 Evaluates to-1.Example
 Evaluates to3. | ||
| 
                
              
                  Full Usage: 
                   tryfind f lParameters: 
 'a -> 'b- 
                      The input function.l : 'a list- 
                      The input list.Returns: 'bThe first successful application of the function to an element of the 
 list. | 
                 Fails with tryfind if the application of the function fails for all elements in the list. This will always be the case if the list is empty. 
 
 
 NotePerhaps it could be replaced with the standard ListModule.TryPick. Example
 Multiple items val string: value: 'T -> string -------------------- type string = System.String val failwith: message: string -> 'TEvaluates to "2".Example
 Multiple items val string: value: 'T -> string -------------------- type string = System.String val failwith: message: string -> 'TThrows System.Exception: tryfind. |