runProjectionMissedHits :: 
    [ColumnName]  -- ^ list of column names to be included in the final result RTable
    -> RTable
    -> RTable
runProjectionMissedHits colNamList irtab = 
    if isRTabEmpty irtab
        then
            emptyRTable
        else
            do -- RTable is a Monad
                srcRtuple <- irtab
                let
                    -- 1. get original column value (in this case it is a list of values)
                    srcValueL = Data.List.map (\src -> HM.lookupDefault       Null -- return Null if value cannot be found based on column name 
                                                                    src   -- column name to look for (source) - i.e., the key in the HashMap
                                                                    srcRtuple  -- source RTuple (i.e., a HashMap ColumnName RDataType)
                                    ) colNamList
                    -- 2. create the new RTuple
                    targetRtuple = HM.fromList (Data.List.zip colNamList srcValueL)
                return targetRtuple


-- | restrictNrows: returns the N first rows of an RTable
runProjectionMissedHits :: 
    [ColumnName]  -- ^ list of column names to be included in the final result RTable
    -> RTable
    -> RTable
runProjectionMissedHits colNamList irtab = 
    if isRTabEmpty irtab
        then
            emptyRTable
        else
            do -- RTable is a Monad
                srcRtuple <- irtab
                let
                    -- 1. get original column value (in this case it is a list of values)
                    srcValueL = Data.List.map (\src -> HM.lookupDefault       Null -- return Null if value cannot be found based on column name 
                                                                    src   -- column name to look for (source) - i.e., the key in the HashMap
                                                                    srcRtuple  -- source RTuple (i.e., a HashMap ColumnName RDataType)
                                    ) colNamList
                    -- 2. create the new RTuple
                    targetRtuple = HM.fromList (Data.List.zip colNamList srcValueL)
                return targetRtuple


-- | restrictNrows: returns the N first rows of an RTable
runProjectionMissedHits colNamList irtab = 
    if isRTabEmpty irtab
        then
            emptyRTable
        else
            do -- RTable is a Monad
                srcRtuple <- irtab
                let
                    -- 1. get original column value (in this case it is a list of values)
                    srcValueL = Data.List.map (\src -> HM.lookupDefault       Null -- return Null if value cannot be found based on column name 
                                                                    src   -- column name to look for (source) - i.e., the key in the HashMap
                                                                    srcRtuple  -- source RTuple (i.e., a HashMap ColumnName RDataType)
                                    ) colNamList
                    -- 2. create the new RTuple
                    targetRtuple = HM.fromList (Data.List.zip colNamList srcValueL)
                return targetRtuple


-- | restrictNrows: returns the N first rows of an RTable