ins_effect_before lll@(l:ll) (i:ii) ne
    | l >= i && null ii = (l+ne):ll
    | l == i = l:(ins_effect_before ll ii ne)
    | otherwise = lll
ins_effect_before lll@(l:ll) (i:ii) ne
    | l >= i && null ii = (l+ne):ll
    | l == i = l:(ins_effect_before ll ii ne)
    | otherwise = lll
ins_effect_before lll@(l:ll) (i:ii) ne
    | l >= i && null ii = (l+ne):ll
    | l == i = l:(ins_effect_before ll ii ne)
    | otherwise = lll