fold input/output into direction
fold input/output into direction