grimoire v0.0.2 Grimoire.Utilities.ListFn

Link to this section Summary

Functions

lists the items in l1 that are not in l2

lists the items in l2 that are not in l1

lists the items that are in both l1 and l2

Link to this section Functions

Link to this function

deletes(l1, l2)

lists the items in l1 that are not in l2

Examples

iex> import Utilities.ListFn
iex> deletes([:a, :b], [:a, :c])
[:b]
iex> deletes([:a], [:a])
[]
Link to this function

inserts(l1, l2)

lists the items in l2 that are not in l1

Examples

iex> import Utilities.ListFn
iex> inserts([:a, :b], [:a, :c])
[:c]
iex> inserts([:a], [:a])
[]
iex> inserts([{:users, :name}], [{:users, :name}, {:dogs, :owner}])
[{:dogs, :owner}]
Link to this function

intersects(l1, l2)

lists the items that are in both l1 and l2

Examples

iex> import Utilities.ListFn
iex> equal([:a, :b], [:a, :c])
[:a]