Skip to content
Jonathan Potter edited this page Jun 5, 2014 · 3 revisions

unique(xs)

unique : [a] -> [a]

Types

xs : Array
return : Array

Description

Removes duplicate elements from xs.

uniqueBy(eq, xs)

uniqueBy : (a -> a -> Boolean) -> [a] -> [a]

Types

eq : Function
xs : Array
return : Array

Description

Like tlc.unique but lets you specify a custom equality function eq.

union(xs, ys)

union : [a] -> [a] -> [a]

Types

xs : Array
ys : Array
return : Array

Description

Returns an array combining elements of xs and ys but removing duplicates.

unionBy(eq, xs, ys)

unionBy : (a -> a -> Boolean) -> [a] -> [a] -> [a]

Types

eq : Function
xs : Array
ys : Array
return : Array

Description

Like tlc.union but lets you specify a custom equality function eq.

intersect(xs, ys)

intersect : [a] -> [a] -> [a]

Types

xs : Array
ys : Array
return : Array

Description

Returns and array with the elements that are in both xs and ys.

intersectBy(eq, xs, ys)

intersectBy : (a -> a -> Boolean) -> [a] -> [a] -> [a]

Types

eq : Function
xs : Array
ys : Array
return : Array

Description

Like tlc.intersect but lets you specify a custom equality function eq.

API

  • [Array](API Array)
  • [Function](API Function)
  • [Maybe](API Maybe)
  • [Object](API Object)
  • [Set](API Set)
  • [Typeclass](API Typeclass)

Guides

  • [Operators](Guide Operators)
  • [Typeclasses](Guide Typeclasses)
  • [Replacing OOP](Guide Replacing Object Oriented Programming)

General

Clone this wiki locally