NumEx v0.1.0 Logic View Source
A module to perform Logical operations on enumerables
Link to this section Summary
Functions
Takes two arrays and performs logical and operation for the corresponding elements in each array
Takes an array and performs logical not operation on every induvidual element present in it
Takes two arrays and performs logical or operation for the corresponding elements in each array
Takes two arrays and performs logical xor operation for the corresponding elements in each array
Link to this section Functions
logical_and([number()], [number()]) :: [number()]
Takes two arrays and performs logical and operation for the corresponding elements in each array
Examples
iex> Logic.logical_or([false, false, true, true],[false, true, false, true])
[false, true, true, true]
iex> Logic.logical_or([-1, 1, 2, 10],[0, 1, 0, 4])
[-1, 1, 2, 10]
Takes an array and performs logical not operation on every induvidual element present in it
Examples
iex> Logic.logical_not([true, false])
[false, true]
logical_or([number()], [number()]) :: [number()]
Takes two arrays and performs logical or operation for the corresponding elements in each array
Examples
iex> Logic.logical_and([false, false, true, true],[false, true, false, true])
[false, false, false, true]
iex> Logic.logical_and([-1, 1, 2, 10],[0, 1, 0, 4])
[0, 1, 0, 4]
logical_xor([boolean()], [boolean()]) :: [boolean()]
Takes two arrays and performs logical xor operation for the corresponding elements in each array
Examples
iex> Logic.logical_xor([false, false, true, true],[false, true, false, true])
[false, true, true, false]