reference impl of pascal()
ignore object files
reference impl of is_balanced()