MoreList

DATE : august 2001
AUTHOR : underdarkPrime
ADDRESS : underdarkPrime@yahoo@com

Index


  1. dropWhile
  2. elem
  3. intersect
  4. nub
  5. split
  6. takeWhile

Provide some additional list functions.

nub

nub : 'a list -> 'list

nub s removes duplicate elements from the list s.

elem

elem : 'a -> 'a list -> bool

elem x s tests if x is an element of the list s.

takeWhile

takeWhile : ('a->bool)->'a list->'a list

takeWhile p s returns the longest prefix of s whose elements satisfies p.

dropWhile

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

split : ('a->bool)->'a list->('a list * 'a list)



split p s returns the pair (dropWhile p s, takeWhile p s).

intersect

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