# Path: makeQuantity.py
# def     makeScalar(value, prototype=(0,)):
#     """
#     make an APL scalar quantity from a scalar Python value
#     """
#     if isinstance(value, aplQuantity):
#         assertError("makeScalar: needs more thought")
# 
#     try:
#         value = value.__iter__().__next__()
#     except AttributeError:
#         pass
# 
#     return aplQuantity((value,), None, prototype)
# 
# Path: aplError.py
# def     assertError(message):
#     """
#     raise an exception so aborting the current operation
#     """
#     raise aplException(message)


import monadicMaps as mapper
import monadicFunctions as monadic
import monadicIterators as iterator
from makeQuantity import makeScalar
from aplError import assertError
    """
    assertError("FUNCTION NOT YET IMPLEMENTED")

# ------------------------------

_MonadicFunctions = {
    # Arithmetic
    '+':        lambda B: mapper.maths(monadic.identity, B),
    '-':        lambda B: mapper.maths(monadic.negation, B),
    '×':        lambda B: mapper.maths(monadic.signum, B),
    '÷':        lambda B: mapper.maths(monadic.reciprocal, B),
    '⌈':        lambda B: mapper.maths(monadic.ceil, B),
    '⌊':        lambda B: mapper.maths(monadic.floor, B),
    '|':        lambda B: mapper.maths(monadic.magnitude, B),

    # Algebraic
    '*':        lambda B: mapper.maths(monadic.exp, B),
    '⍟':        lambda B: mapper.maths(monadic.log, B),
    '!':        lambda B: mapper.maths(monadic.factorial, B),
    '?':        lambda B: mapper.maths(monadic.roll, B),
    '⌹':        _toBeImplemented,       # matrix inverse

    # Trigonometric
    '○':        lambda B: mapper.maths(monadic.pi, B),

    # Logical
    '~':        lambda B: mapper.maths(monadic.logicalNegation, B),
    '∨':        lambda B: assertError("VALENCE ERROR"),
    '∧':        lambda B: assertError("VALENCE ERROR"),
    '⍱':        lambda B: assertError("VALENCE ERROR"),

# Path: makeQuantity.py
# def     makeScalar(value, prototype=(0,)):
#     """
#     make an APL scalar quantity from a scalar Python value
#     """
#     if isinstance(value, aplQuantity):
#         assertError("makeScalar: needs more thought")
# 
#     try:
#         value = value.__iter__().__next__()
#     except AttributeError:
#         pass
# 
#     return aplQuantity((value,), None, prototype)
# 
# Path: aplError.py
# def     assertError(message):
#     """
#     raise an exception so aborting the current operation
#     """
#     raise aplException(message)


# Path: monadicLookup.py
import monadicMaps as mapper
import monadicFunctions as monadic
import monadicIterators as iterator
from makeQuantity import makeScalar
from aplError import assertError

    """
    assertError("FUNCTION NOT YET IMPLEMENTED")

# ------------------------------

_MonadicFunctions = {
    # Arithmetic
    '+':        lambda B: mapper.maths(monadic.identity, B),
    '-':        lambda B: mapper.maths(monadic.negation, B),
    '×':        lambda B: mapper.maths(monadic.signum, B),
    '÷':        lambda B: mapper.maths(monadic.reciprocal, B),
    '⌈':        lambda B: mapper.maths(monadic.ceil, B),
    '⌊':        lambda B: mapper.maths(monadic.floor, B),
    '|':        lambda B: mapper.maths(monadic.magnitude, B),

    # Algebraic
    '*':        lambda B: mapper.maths(monadic.exp, B),
    '⍟':        lambda B: mapper.maths(monadic.log, B),
    '!':        lambda B: mapper.maths(monadic.factorial, B),
    '?':        lambda B: mapper.maths(monadic.roll, B),
    '⌹':        _toBeImplemented,       # matrix inverse

    # Trigonometric
    '○':        lambda B: mapper.maths(monadic.pi, B),

    # Logical
    '~':        lambda B: mapper.maths(monadic.logicalNegation, B),
    '∨':        lambda B: assertError("VALENCE ERROR"),
    '∧':        lambda B: assertError("VALENCE ERROR"),
    '⍱':        lambda B: assertError("VALENCE ERROR"),

    '⍲':        lambda B: assertError("VALENCE ERROR"),