KEGGeneratorInlining

SqueakSource3 project page

The KEGGeneratorInlining library will help you to concatenate KEGGenerators together into larger sequences. The >>inlineEmbeddedSequencesDeep: Method can help you to take any tree structure and convert it into a KEGGenerator sequence. This can be used for depth first tree walking etc. Or if you have a sequence/Collections with embedded sequences/Collections inside of it forming a kind of tree structure and you want that tree to be flattened out into a single sequence then use >>inlineEmbeddedSequencesDeep . If you just want sequences to be concatenated together in an efficient way then use >>inlineEmbeddedSequences . If you have a sequence and you want to inject other sequences into it at specific points along the way then use the >>disperse: Method which can also be used for concatenation. There are several other Methods which can also be used namely: >>collect:seperatedBy: >>repeat: and >>seperatedBy: .
KEGGeneratorInlining is a library that implements Smalltalk Generators like those found in the book A Little Smalltalk. It is well documented in the Method comments. The main documentation is in the public Methods in the KEGGenerator Class that all have long comments. There are 8 TestCase(s) which you can find in the test runner by looking for the KEGTestCaseObject Class and selecting its KEGGenerator subClass to run the tests. These tests are designed to show lots of examples of how to get the basic functionality of each generator Method to work. They show basic one line examples of each Method but they don`t really give a flavor of how KEGGenerators are used in practice. Here is how you load the KEGGeneratorInlining Packages into a virgin image. First you open the Monticello browser. Hit the +Repository button. Select HTTP. Below on this webpage see the Monticello Registration. Click on it and copy the text String. Right click copy. Paste the String into the Monticello dialog. Click OK. A new Repository browser will open. In the left pane click on the ConfigurationOfKEGGeneratorInlining Package .mcz file with the highest version number. It should look something like ConfigurationOfKEGGeneratorInlining-KjellGodo.1.mcz. Click the Load button. It should load. Now open a Workspace. and evaluate the following to exclude the testing Packages : ( ( ConfigurationOfKEGGeneratorInlining project version: '1.0' ) load ). Now to include the testing Packages evaluate the following : ( ( ConfigurationOfKEGGeneratorInlining project version: '1.0' ) load: 'Tests' ) I hope you will give KEGGeneratorInlining a try. Contact me at picoVerse att gMail dott com. There is a google group for this library at https://groups.google.com/forum/?hl=en&fromgroups=#!forum/keggenerators . KEGGeneratorInlining now works with Pharo 2.0.

ConfigurationOfKEGGeneratorInlining-KjellGodo.1.mcz
KEGGeneratorInliningTest-KjellGodo.1.mcz
KEGGeneratorInlining-KjellGodo.1.mcz