def apply_bparams(fn):
    """
    apply fn to each line of bparams, returning the result
    """
    cmd = ["bparams", "-a"]
    try:
        output = subprocess.check_output(cmd).decode('utf-8')
    except:
        return None
    return fn(output.split("\n"))
apply fn to each line of bparams, returning the result