2 ms·
In the interest of comparing, using your simplification, here's a Smalltalk version... englishList: aList ^ aList size > 2 ifFalse: [
by gnaritas 18y ago
In the interest of comparing, using your simplification, here's a Smalltalk version...
englishList: aList
^ aList size > 2
ifFalse: [ aList join: ' and ' ]
ifTrue: [ (aList allButLast join: ',') , ' and ' , aList last ]