updateRTab ((colName, newVal) : rest) rpred inputRtab = 
    {-
        Here is the update algorithm:

        FinalRTable = UNION (Table A) (Table B)

        where
            Table A = the subset of input RTable that includes the rtuples that satisfy the input RPredicate, with updated values in the
                        corresponding columns
            Table B = the subset of input RTable that includes all the rtuples that DONT satisfy the input RPredicate
    -}
    if isRTabEmpty inputRtab 
        then emptyRTable
        else
            let 
                tabA = rtabMap (upsertRTuple colName newVal) (f rpred inputRtab)
                tabB = f (not . rpred) inputRtab 
            in updateRTab rest rpred (u tabA tabB)
updateRTab ((colName, newVal) : rest) rpred inputRtab = 
    {-
        Here is the update algorithm:

        FinalRTable = UNION (Table A) (Table B)

        where
            Table A = the subset of input RTable that includes the rtuples that satisfy the input RPredicate, with updated values in the
                        corresponding columns
            Table B = the subset of input RTable that includes all the rtuples that DONT satisfy the input RPredicate
    -}
    if isRTabEmpty inputRtab 
        then emptyRTable
        else
            let 
                tabA = rtabMap (upsertRTuple colName newVal) (f rpred inputRtab)
                tabB = f (not . rpred) inputRtab 
            in updateRTab rest rpred (u tabA tabB)
updateRTab ((colName, newVal) : rest) rpred inputRtab = 
    {-
        Here is the update algorithm:

        FinalRTable = UNION (Table A) (Table B)

        where
            Table A = the subset of input RTable that includes the rtuples that satisfy the input RPredicate, with updated values in the
                        corresponding columns
            Table B = the subset of input RTable that includes all the rtuples that DONT satisfy the input RPredicate
    -}
    if isRTabEmpty inputRtab 
        then emptyRTable
        else
            let 
                tabA = rtabMap (upsertRTuple colName newVal) (f rpred inputRtab)
                tabB = f (not . rpred) inputRtab 
            in updateRTab rest rpred (u tabA tabB)