Rebol3 Code Examples
A collection of programming tasks implemented in Rebol
1100 doorsControl flow
2100 prisonersGames
321 gameGames
424 gameGames
59 billion names of God the integerMath
6Abbreviations, automaticString
7Abbreviations, easyString
8Abbreviations, simpleString
9ABC correlationMath
10ABC problemMisc
11ABC wordsString
12Abelian sandpile model/IdentityMath
13Abundant odd numbersMath
14Achilles numbersMath
15Additive primesMath
16Almost primeMath
17Alternade wordsString
18AmbControl flow
19AnadromesString
20Anagram generatorString
21AnagramsString
22Anagrams/Deranged anagramsString
23Angle difference between two bearingsMath
24Angles (geometric), normalization and conversionMath
25Anti-primesMath
26Append numbers at same position in stringsString
27Archimedean spiralGraphics
28Arithmetic evaluationMath
29Attractive numbersMath
30Audio alarmI/O
31Audio frequency generatorI/O
32Audio overlap loopI/O
33Autogram checkerString
34Babylonian spiralGraphics
35Bacon cipherCrypto / encoding
36Balanced bracketsString
37Barnsley FernGraphics
38Bell numbersMath
39Best shuffleData structures
40Bifid cipherCrypto / encoding
41Bilinear interpolationGraphics
42Bioinformatics/Sequence mutationMisc
43BiorhythmsMath
44Bitcoin address validationCrypto / encoding
45Bitmap/Flood fillGraphics
46Bitmap/HistogramGraphics
47Bitmap/Midpoint circle algorithmGraphics
48Bitmap/Read a PPM fileI/O
49Bitmap/Write a PPM fileI/O
50Bitwise IOI/O
51Bitwise operationsMath
52BoidsGraphics
53Box the compassMisc
54Brazilian numbersMath
55Brownian treeGraphics
56Bulls and cowsGames
57Bulls and cows playerGames
58Burrows–Wheeler transformCrypto / encoding
59Caesar cipherCrypto / encoding
60Calendar - for "REAL" programmersMisc
61Call an object methodControl flow
62Camel case and snake caseString
63Card shufflesGames
64Case-sensitivity of identifiersnone
65Catalan numbersMath
66Catalan numbers/Pascal's triangleMath
67Catamorphismnone
68Changeable wordsString
69Chinese remainder theoremMath
70Chinese zodiacMisc
71Color quantization (Median cut)Graphics
72Color quantization (Octree)Graphics
73Color wheelGraphics
74Colour bars/DisplayGraphics
75Command-line argumentsnone
76Compare length of two stringsString
77Conway's Game of LifeGames
78Count in octalMath
79Count the coins/0-1Math
80Create a two-dimensional array at runtimeData structures
81Create an HTML tableString
82CSV data manipulationI/O
83CSV to HTML translationI/O
84CurrencyMath
85CUSIPMath
86Damm algorithmMath
87Deal cards for FreeCellGames
88Death StarGraphics
89DeepcopyControl flow
90Digit fifth powersMath
91Digital rootMath
92Dijkstra's algorithmMath
93Discordian datenone
94Display a linear combinationMath
95DNS queryI/O
96Doomsday ruleMisc
97Dragon curveGraphics
98Draw a clock (CLI)Graphics
99Draw a cuboidGraphics
100Draw a pixelGraphics
101Draw a sphereGraphics
102Draw a torusGraphics
103Element-wise operationsMath
104EntropyMath
105Ethiopian multiplicationMath
106Euclidean rhythmMisc
107Euler methodMath
108Euler's constant 0.5772...Math
109Evolutionary algorithmMisc
110Exactly three adjacent 3 in listsData structures
111Execute Brain****Misc
112Extend your languageMisc
113Extensible prime generatorMath
114FASTA formatI/O
115Fibonacci sequenceMath
116File extension is in extensions listString
117File modification timeI/O
118Find common directory pathString
119Find first missing positiveData structures
120Find limit of recursionControl flow
121Find prime n such that reversed n is also primeMath
122Find squares n where n+1 is primeMath
123Find unimplemented tasksMisc
124Find words with alternating vowels and consonantsenone
125First-class functions/Use numbers analogouslyControl flow
126Five weekendsMisc
127Flipping bits gamenone
128Floyd's trianglenone
129Forest fireGraphics
130Four is magicMisc
131Fractal treeGraphics
132Fraction reductionMath
133FractranMath
134Gamma functionMath
135Gapful numbersMath
136Generate lower case ASCII alphabetString
137Generate random numbers without repeating a valueData structures
138Get system command outputI/O
139Go FishGames
140Gosper's hackMisc
141Gray codeMath
142Grayscale imageGraphics
143GreedGames
144GSTrans string conversionString
145Happy numbersMath
146Harriss SpiralGraphics
147Hash joinData structures
148Hello world/Standard errorI/O
149Hello world/Web servernone
150Here documentString
151Heronian trianglesMath
152Hex dumpData structures
153Huffman codingCrypto / encoding
154I before E except after CString
155IBANMath
156Image noiseGraphics
157Include a fileControl flow
158Increment loop index within loop bodyControl flow
159InfinityMath
160Integer overflowMath
161Integer sequenceMath
162IntrospectionControl flow
163Inverted indexData structures
164ISBN13 check digitMath
165Jacobsthal numbersMath
166JSON pointerString
167Julia setGraphics
168Knapsack problem/0-1Math
169Knapsack problem/BoundedMath
170Knapsack problem/ContinuousMath
171Knapsack problem/UnboundedMath
172Knight's tourGames
173Knuth shuffleData structures
174Kronecker productMath
175Kronecker product based fractalsMath
176Largest number divisible by its digitsMath
177Leap yearMisc
178Legendre prime counting functionMath
179Letter frequencyString
180Levenshtein distanceString
181Long multiplicationMath
182Long yearMath
183Longest common suffixString
184Longest string challengeString
185Look-and-say sequenceMath
186Loops/With multiple rangesControl flow
187Loops/Wrong rangesControl flow
188Ludic numbersMath
189Luhn test of credit card numbersMath
190Lychrel numbersMath
191Lyndon wordString
192LZW compressionCrypto / encoding
193Mandelbrot setGraphics
194Markov chain text generatorString
195Mayan numeralsMisc
196Maze generationGraphics
197MD4Crypto / encoding
198Memory allocationMisc
199Minimum numbers of three listsData structures
200Minimum primesMath
201Morse codeCrypto / encoding
202MultitonMisc
203Munching squaresGraphics
204Möbius functionMath
205N'thString
206Named parametersMisc
207Naming conventionsMisc
208Natural sortingData structures
209Nautical bellMisc
210Neighbour primesMath
211Nested functionControl flow
212Nice primesMath
213Nim gameGames
214Number namesString
215Numbers divisible by their individual digits, but not by the product of their digitsMath
216Object serializationI/O
217Odd and square numbersMath
218Old lady swallowed a flyMisc
219Old Russian measure of lengthMath
220One-dimensional cellular automataControl flow
221Ordered wordsString
222Ormiston pairsMath
223Padovan n-step number sequencesMath
224Pairs with common factorsMath
225Palindrome datesMisc
226Palindrome detectionString
227Palindromic gapful numbersMath
228Palindromic primes in base 16Math
229Parsing/Shunting-yard algorithmData structures
230Partial function applicationMisc
231Pascal's triangleMath
232PentagramGraphics
233Periodic tableMisc
234Peripheral drift illusionGraphics
235Perlin noiseGraphics
236Permutation testMath
237PermutationsData structures
238Permutations with repetitionsData structures
239Permuted multiplesMath
240Phrase reversalsString
241Pick random elementMisc
242Pig the dice gameGames
243PiprimesMath
244Playing cardsGames
245Poker hand analyserGames
246Polynomial regressionMath
247PolyspiralGraphics
248Population countMath
249Prime conspiracyMath
250Priority queueData structures
251Probabilistic choiceMath
252Program nameMisc
253Pseudo-random numbers/Middle-square methodMath
254Pythagoras treeGraphics
255QuaternionMath
256Quickselect algorithmMath
257QuineMisc
258Random numbersMath
259Range expansionString
260Range extractionString
261Read a configuration fileI/O
262Read a file line by lineI/O
263Recaman's sequenceMath
264Reduced row echelon formMath
265Rep-stringString
266RepeatMisc
267Return multiple valuesControl flow
268Rock-paper-scissorsGames
269Roman numerals/DecodeMath
270Roman numerals/EncodeMath
271Rosetta Code/Rank languages by popularityMisc
272Rosetta_Code/Count_examplesMisc
273RPG attributes generatorGames
274Sattolo cycleData structures
275Search a list of recordsData structures
276Self-describing numbersMath
277SemordnilapString
278Sequence of non-squaresMath
279SHA-256 Merkle treeCrypto / encoding
280Short-circuit evaluationControl flow
281Show ASCII tableMisc
282Show the epochMisc
283Sierpinski carpetGraphics
284Sierpinski triangleGraphics
285Sieve of EratosthenesMath
286Sieve of PritchardMath
287Sleeping Beauty problemMisc
288Smallest numbersMath
289Snake and ladderGames
290Soloway's recurring rainfallMath
291Solve the no connection puzzleMisc
292Sort a list of object identifiersData structures
293Sort numbers lexicographicallyData structures
294Sort stabilityData structures
295Sort three variablesData structures
296Sort using a custom comparatorData structures
297Sorting algorithms/Bead sortData structures
298Sorting algorithms/BogosortData structures
299Sorting algorithms/Bubble sortData structures
300Sorting algorithms/Cocktail sortData structures
301Sorting algorithms/Comb sortData structures
302Sorting algorithms/Counting sortData structures
303Sorting algorithms/Gnome sortData structures
304Sorting algorithms/Insertion sortData structures
305Sorting algorithms/Patience sortData structures
306Sorting algorithms/Permutation sortData structures
307Sorting algorithms/QuicksortData structures
308Sorting algorithms/Radix sortData structures
309Sorting algorithms/Selection sortData structures
310Sorting algorithms/Shell sortData structures
311Sorting algorithms/Stooge sortData structures
312Sorting algorithms/Strand sortData structures
313SoundexString
314Sparkline in unicodeString
315Speech synthesisI/O
316Spiral matrixMath
317Stack tracesMisc
318Statistics/BasicMath
319Statistics/Normal distributionMath
320Stem-and-leaf plotData structures
321Straddling checkerboardCrypto / encoding
322String comparisonString
323String matchingString
324String prependnone
325Strip a set of characters from a stringString
326Strip block commentsString
327Strip whitespace from a string/Top and tailString
328Sub-unit squaresMath
329Substitution cipherCrypto / encoding
330Substring/Top and tailString
331Sudan functionMath
332SudokuMisc
333Sum digits of an integerMath
334Sum of a seriesMath
335Sum of first n cubesnone
336Sum of squaresMath
337Sum to 100Math
338Summation of primesMath
339Sunflower fractalGraphics
340Temperature conversionMath
341Terminal control/Restricted width positional input/No wrappingI/O
342Ternary logicMath
343Test a functionControl flow
344The sieve of SundaramMath
345The Twelve Days of ChristmasMisc
346Three word locationData structures
347Time a functionI/O
348Tokenize a string with escapingString
349Top rank per groupData structures
350Transliterate English text using the Greek alphabetString
351Truncate a fileI/O
352Twelve statementsMisc
353Two identical stringsnone
354Unicode stringsString
355Unicode variable namesMisc
356Unique charactersString
357Unique characters in each stringString
358Unix/lsI/O
359URL decodingI/O
360URL encodingI/O
361Useless instructionsControl flow
362Validate International Securities Identification NumberMath
363Variable declaration resetMisc
364VectorData structures
365Vector productsMath
366Vigenère cipherCrypto / encoding
367Voronoi diagramGraphics
368Walk a directory/Non-recursivelyI/O
369Walk a directory/RecursivelyI/O
370War card gameGames
371Water collected between towersMath
372Wave function collapseGraphics
373Word frequencyString
374Word wheelGames
375Word wrapString
376WordiffString
377Wordle comparisonGames
378Words from neighbour onesString
379Write entire fileI/O
380Write float arrays to a text fileI/O
381Write language name in 3D ASCIIGraphics
382XXXX redactedString
383Zeckendorf number representationMath
384Zig-zag matrixMath