(1) As it happens, my Smalltalk library *does* have
������ #excludes: and #identityExcludes:
(2) The definitions are trivial.
������ excludes: item
�� ������ ^(self includes: item) not
������ identityExcludes: item
���������� ^(self identityIncludes: item) not
If you want to execute aBlock when aString is not all zeros
and ones, just do
���� (aString allSatisfy: [:each | each = $0 or: [each = $1]])
�������� ifFalse: [aBlock value].
or
���� (aString anySatisfy: [:each | each ~= $0 and: [each ~= $1]])
�������� ifTrue: [aBlock value].
or
���� ('01' includesAll: aString) ifFalse: [aBlock value].