def compare(a, b):
    """None-aware comparison helper for Lisplet.

    >>> compare(None, None)
    0
    >>> compare(None, 12)
    -1
    >>> compare(12, None)
    1
    >>> compare(12, 12)
    0
    >>> compare(12, -12)
    1
    >>> compare(-12, 12)
    -1
    """
    if a is None:
        if b is None:
            return 0

        return -1

    if b is None:
        return 1

    if a < b:
        return -1

    if a > b:
        return 1

    return 0