Don't like ads? PRO users don't see any ads ;-)
Guest

Kuchin

By: a guest on Jun 1st, 2012  |  syntax: Smalltalk  |  size: 0.17 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. |dict f|
  2. dict := Dictionary new.
  3.  
  4. dict at: '1' put: #cold.
  5. dict at: '2' put: #pull.
  6. dict at: '3' put: #go.
  7. dict at: '4' put: #go.
  8.  
  9. dict at: '5' ifAbsent: [f:=1].
  10. ^f