def _concat_fasls(ctx, inputs, output):
    """Concatenates several FASLs into a combined FASL.

    Args:
      ctx: Rule context
      inputs: List of files to concatenate.
      output: File output for the concatenated contents.
    """
    if not inputs:
        return None
    elif len(inputs) == 1:
        return inputs[0]
    else:
        cat_command = "cat ${@:2} > $1"
        cat_args = ctx.actions.args()
        cat_args.add(output)
        cat_args.add_all(inputs)
        ctx.actions.run_shell(
            inputs = inputs,
            outputs = [output],
            progress_message = "Combining %{output}",
            mnemonic = "LispConcatFASLs",
            command = cat_command,
            arguments = [cat_args],
        )
        return output