add some weak general test, factor them out. Apply to rlogical and rinteger
curry helper