Skip to content

Instantly share code, notes, and snippets.

Created June 4, 2011 15:51
What would you like to do?
One liners in Smalltalk
"Smalltalk version of "
"1. Multiple Each Item in a List by 2"
(1 to: 10) * 2.
"2. Sum a List of Numbers"
"Version 1"
(1 to:1000) reduce:[:a :b|a+b].
"Version 2"
(1 to:1000) sum.
"3. Verify if Exists in a String"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment