1. Home
  2. /
  3. Smalltalk
  4. /
  5. Even Numbers Filter

Even Numbers Filter - Smalltalk Typing CST Test

Loading…

Even Numbers Filter — Smalltalk Code

Prints even numbers from an array.

arr := #(1 2 3 4 5).
arr do: [:x | (x \ 2 = 0) ifTrue: [Transcript show: x printString; cr]].

Smalltalk Language Guide

Smalltalk is a dynamically typed, object-oriented programming language known for its pure object model, live environment, and influential role in the development of modern OOP concepts. Everything in Smalltalk is an object, including numbers, classes, and code blocks.

Primary Use Cases

  • ▸Educational programming for OOP concepts
  • ▸Rapid prototyping of applications
  • ▸GUI-based application development
  • ▸Dynamic systems with runtime object inspection
  • ▸Research in programming languages and software design
  • ▸Domain-specific languages and frameworks

Notable Features

  • ▸Pure object-oriented system
  • ▸Everything is an object
  • ▸Dynamic typing and reflection
  • ▸Live programming environment (image-based)
  • ▸Message passing paradigm

Origin & Creator

Smalltalk was created in the 1970s at Xerox PARC by Alan Kay, Dan Ingalls, Adele Goldberg, and others as part of the development of object-oriented programming and graphical user interfaces.

Industrial Note

Smalltalk has been widely used in educational environments, early GUI-based applications, research prototypes, and some enterprise applications requiring highly dynamic and reflective systems.

More Smalltalk Typing Exercises

Smalltalk Counter and Theme ToggleSmalltalk Simple AdditionSmalltalk FactorialSmalltalk Fibonacci SequenceSmalltalk Max of Two NumbersSmalltalk Array SumSmalltalk Conditional Counter IncrementSmalltalk Resettable CounterSmalltalk Theme Toggle Only

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher