def prefix(neg, IPA):
    """
    Retrieve appropriate forms of prefixes based on polarity and alphabet

    Parameters
    ----------
    neg : bool
        A flag used to determine the polarity
    IPA : bool
        A flag used to determine the type of alphabet

    Returns
    -------
    list
        a list of appropriate prefixes
    """
    cont = [[f'می', 'mi'], [f'نمی', 'nemi']][neg][IPA]
    negt = 'næ' if neg and IPA else 'ن' if neg else ''
    sub = [['ب', 'be'], ['ن', 'næ']][neg][IPA]
    return [cont, negt, sub]