Adding support for partial_arg and partial_res (unfinished)