6 lines
158 B
Text
6 lines
158 B
Text
s@(Sequence traits) isPalindrome
|
|
[
|
|
s isEmpty
|
|
ifTrue: [True]
|
|
ifFalse: [(s first = s last) /\ [(s sliceFrom: 1 to: s indexLast - 1) isPalindrome]]
|
|
].
|