Recent public codes are listed below. You can filter them by the following programming languages:
- view
- All
- Ada
- Assembler
- Assembler
- AWK (gawk)
- AWK (mawk)
- Bash
- bc
- Brainf**k
- C
- C#
- C++
- C++0x
- C99 strict
- CLIPS
- Clojure
- COBOL
- COBOL 85
- Common Lisp (clisp)
- D (dmd)
- Erlang
- F#
- Factor
- Falcon
- Forth
- Fortran
- Go
- Groovy
- Haskell
- Icon
- Intercal
- Java
- JavaScript (rhino)
- JavaScript (spidermonkey)
- Lua
- Nemerle
- Nice
- Nimrod
- Objective-C
- Ocaml
- Oz
- Pascal (fpc)
- Pascal (gpc)
- Perl
- Perl 6
- PHP
- Pike
- Prolog (gnu)
- Prolog (swi)
- Python
- Python 3
- R
- Ruby
- Scala
- Scheme (guile)
- Smalltalk
- SQL
- Tcl
- Text
- Unlambda
- VB.NET
- Whitespace
-
1 2 3
aBag := #( 1 2 3 3 3 3) asBag. aBag size -> 6. aBag occurrencesOf: 3
-
1 2 3
aBag := #( 1 2 3 3 3 3) asBag. aBag size:=6. aBag occurrencesOf: 3
-
1 2 3
aBag := #( 1 2 3 3 3 3) asBag. aBag size:=6 aBag occurrencesOf: 3
-
1 2 3
aBag := #( 1 2 3 3 3 3) asBag. aBag size -> 6 aBag occurrencesOf: 3
-
1 2 3
aBag := #( 1 2 3 3 3 3) asBag. aBag size -> 6 aBag occurrencesOf: 3
-
1 2 3 4 5 6 7 8
| nterms | nterms := 10. ^(3 to: nterms) inject: (OrderedCollection with: 1 with: 1) into: [ :inj :n | inj addLast: ((inj at: n - 2) + (inj at: n - 1) ); yourself. inj display].
-
1 2 3 4 5 6 7 8 9
| nterms | nterms := 10. ^(3 to: nterms) inject: (OrderedCollection with: 1 with: 1) into: [ :inj :n | inj addLast: ((inj at: n - 2) + (inj at: n - 1) ); yourself ]. inj display.
-
1 2 3 4 5 6
| aDictionary a | aDictionary:=Dictionary new. aDictionary add: (Association key: '27511' value: 'Cary'). a:= aDictionary at:'27511'. Transcript show: a printString. aDictionary display
-
1 2 3 4
| a | a := #(1 2 3 4 5) asOrderedCollection. a copy do: [ :elem | a add: elem ]. a display
-
1 2 3
| collection oc | collection := 1 to: 20 by: 2. Transcript show: collection printString
-
1 2 3
| collection oc | collection := 1 to: 20 by: 2. Transcript show: collection
-
1 2 3 4 5
| collection oc | collection := 1 to: 20 by: 2. oc := OrderedCollection new. oc addAll: collection. oc display
-
1 2 3 4 5 6 7
| cars | cars := Array new: 3. cars at: 1 put: 1. cars at: 2 put: 2. cars at: 3 put: 3. cars at: 4 put: 4. cars display
-
1 2 3 4 5 6 7
| cars | cars := Array new: 3. cars add: 1. cars add: 2. cars add: 3. cars add: 4. cars display
-
1 2 3 4 5 6 7
| cars | cars := OrderedCollection new: 3. cars add: 1. cars add: 2. cars add: 3. cars add: 4. cars display
-
1 2 3 4 5 6 7 8
| aBag sizeBag aCount | aBag:= Bag new. aBag := #( 1 2 3 4 5 4 3 2 1 ) asBag. sizeBag:= aBag size. aCount:= aBag occurrencesOf: 3. Transcript show: 'Size -> ',sizeBag printString. Transcript cr; show: 'Count -> ',aCount printString. aBag display
-
1 2 3 4 5
| anArray | Array with:'string 1' with:'string 2'. anArray:= Array new: 10. anArray at: 10 put: 5. anArray display
-
1 2 3 4 5
| anArray | Array with:'string 1' with:'string 2'. anArray:= Array new 10. anArray at: 10 put: 5. anArray display
-
1 2 3 4 5
| anArray | Array with:'string 1' with:'string 2'. anArray:= Array new 10. anArray add: 5. anArray display
-
1 2 3 4 5
| anArray | Array with:'string 1' with:'string 2'. anArray:= Array new 10. anArray at: 1 put: 5. anArray display
-
1 2 3 4 5
| anArray | Array with:'string 1' with:'string 2'. anArray:= Array new. anArray at: 1 put: 5. anArray display
-
1 2 3 4 5
| anArray | Array with:'string 1' with:'string 2'. anArray:= Array new 4. anArray at: 1 put: 5. anArray display
-
1 2 3 4
| anArray | Array with:'string 1' with:'string 2'. anArray:= Array new 4. anArray display
-
1
-
1 2 3 4 5 6 7
|aCollection aLength anArray| aCollection := OrderedCollection new: 10. anArray:= Array new 4. anArray with:'string 1' with:'string 2'. aLength:= aCollection size . Transcript show: aLength printString. anArray display
-
1 2 3 4 5 6 7
|aCollection aLength anArray| aCollection := OrderedCollection new: 10. anArray:= Array new. anArray with:'string 1' with:'string 2'. aLength:= aCollection size . Transcript show: aLength printString. anArray display
-
1 2 3 4
|aCollection aLength| aCollection := OrderedCollection new: 10. aLength:= aCollection size . Transcript show: aLength printString
-
1 2 3 4 5
|aCollection aLength| aCollection := OrderedCollection new: 10. aCollection add: 'string 1'. aLength:= aCollection size . Transcript show: aLength printString
-
1 2 3 4 5
|aCollection aLength| aCollection := OrderedCollection new: 10. aCollection add: 'string 1'. aLength:= aCollection size . Transcript show: aLength printString
-
1 2 3
| aSortColl | aSortColl:= #('hai' 'parith' 'raja') asSortedCollection: [:a :b | (a size < b size)]. aSortColl display


