File tree 2 files changed +15
-1
lines changed 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,16 @@ In code, it looks something like this:
47
47
[ import:12-16, lang:"ruby"] ( code/ruby/bogo.rb )
48
48
{% sample lang="f90" %}
49
49
[ import:24-32, lang:"fortran"] ( code/fortran/bogo.f90 )
50
+ {% sample lang="st" %}
51
+ [ import:2-6, lang:"st"] ( code/smalltalk/bogosort.st )
50
52
{% endmethod %}
51
53
52
54
That's it.
53
55
Ship it!
54
56
We are done here!
55
57
56
- ## Example Code
58
+ ## Example Code
59
+
57
60
{% method %}
58
61
{% sample lang="jl" %}
59
62
[ import, lang:"julia"] ( code/julia/bogo.jl )
@@ -92,6 +95,8 @@ We are done here!
92
95
[ import, lang:"ruby"] ( code/ruby/bogo.rb )
93
96
{% sample lang="f90" %}
94
97
[ import, lang:"fortran"] ( code/fortran/bogo.f90 )
98
+ {% sample lang="st" %}
99
+ [ import, lang:"st"] ( code/smalltalk/bogosort.st )
95
100
{% endmethod %}
96
101
97
102
Original file line number Diff line number Diff line change
1
+ " Add this to the SequenceableCollection: "
2
+ SequenceableCollection >> bogoSort
3
+ " A simple bogosort."
4
+ [ self isSorted ] whileFalse: [
5
+ self shuffle.
6
+ ]
7
+
8
+ " Then you can run this anywhere: "
9
+ #(4 3 2 1 6 5) bogoSort " #(1 2 3 4 5 6)"
You can’t perform that action at this time.
0 commit comments