MoreList
DATE : august 2001
AUTHOR : underdarkPrime
ADDRESS : underdarkPrime@yahoo@com
Index
- dropWhile
- elem
- intersect
- nub
- split
- takeWhile
Provide some additional list functions.
nub : 'a list -> 'list
nub s removes duplicate elements from the list s.
elem : 'a -> 'a list -> bool
elem x s tests if x is an element of the list s.
takeWhile : ('a->bool)->'a list->'a list
takeWhile p s returns the longest prefix of s whose elements satisfies p.
dropWhile : ('a->bool)->'a list->'a list
dropWhile p s returns the rest of the list after the
prefix of s returned by takeWhile p s is dropped
split : ('a->bool)->'a list->('a list * 'a list)
split p s returns the pair (dropWhile p s, takeWhile p s).
intersect : 'a list -> 'a list -> 'a list
intersect s t returns the list of all elements which are both in s and in t. Duplicates are removes.
Generated by mosmldoc --underdarkPrime