What kind of return are you expecting? If you want to remove something if it's within 0.1 of an adjacent item in the list [or perhaps within 0.1 of any item, if the list might not always be in numerical order?], which of the two do you want to remove? The lower number? The higher number? Both? The first one that occurs in the list, regardless of which is lower or higher, or the second one?
If you want to remove the first number in any adjacent pair that are within 0.1 of each other, this comparison of each number to the one immediately following it inexplicably removes one of them [the 2.7]:
(vl-remove-if '(lambda (x) (equal x (cadr (member x lst)) 0.1)) lst)
returns:
(0.0 0.1 2.0 2.1 2.8 3.0 4.0)
whereas [equally inexplicably, if the above doesn't work as expected] if you stretch the fuzz factor just a little over 0.1, it successfully removes all of them:
(vl-remove-if '(lambda (x) (equal x (cadr (member x lst)) 0.101)) lst)
returns:
(0.1 2.1 2.8 3.0 4.0)
Kent Cooper, AIA