Recent Posts
Chip's Tips for Developers
Return To Blog Listing
Programming tips, tricks, and examples from Chip Camden.
Recent Posts Tagged With 'arraylist'
Synergy/DE ls class gets set
In a continuing project, I needed a Set data structure. Sets are similar to lists, but with the additional constraint that they do not contain duplicated elements. I considered creating a new Set class that would impose that constraint, b...
Synergy/DE ls class gets array conversion and deep mapping
Based on a request from Richard Barndt, I’ve added the ability to convert a System.Array (aka array@class) to an ls. I added three new overloads to the from method, so you can convert arrays of up to three dimensions. I’ll add more if thereâ€...
Lazy math added to Synergy/DE mappers
I mentioned in my last post on my ls class for Synergy/DE that it would be nice to include the mathematical operators in my support for lazy evaluation of mapping functors. If you don’t understand what that means, perhaps you should go read that ...
Mapping and filtering Arraylists with the ls class for Synergy/DE
The next logical addition to ls, my ArrayList extension class for Synergy/DE, would be methods for mapping and filtering elements. The Synergy/DE statement FOREACH works just fine on an ls. That’s sufficient for doing what Ruby’s Array#each d...
Sort methods added to ls class for Synergy/DE
Synergy/DE provides two built-in sorting functions, neither of which are useful for in-memory objects. That’s not too surprising, considering that objects are relatively new to Synergy/DE. The SORT statement performs a Tournament Sort, but it onl...
ArrayList extensions for Synergy/DE
Synergy/DE version 9 includes a System.Collections.ArrayList class that mirrors the .NET version of the same name. It’s a big improvement over earlier array constructs in terms of usability with objects, because it’s dynamic. But it doesn’t...
Stack class for Synergy/DE
The concept of a stack has been useful to computing for more than fifty years. It represents a LIFO (Last In First Out) series of data elements. Of course you can use a simple array as if it were a stack — but one of the ways in whi...
Associative array (hash, dictionary) class for Synergy/DE
One of the more useful features found in many scripting languages is the concept of an associative array. It goes by the name of a hash in Perl and Ruby, or a dictionary in Python. A hash lets you associate key values ...
