In julia, how to realize a=b[-1:2] as in R without modifying b

See Julia equivalent to 'not in' in R