You can clone with
" :RL <regexp> will now remove all matched lines in a file
exe '%s,^.*' . a:regexp . '.*$\n,,g'
command! -nargs=1 RL call RemoveLine(<f-args>)
will delete all lines containing foo.
But glad you are learning VimL -- cause I don't want to have to write those wonderful plugins.