Image:
 Author: s_noonan Group: Default Filesize: 81.51 kB Date added: 2025-08-31 Rating: 5.6 Downloads: 673 Views: 367 Comments: 5 Ratings: 2 Times favored: 0 Made with: Algodoo v2.2.3 Tags:
|
This scene is a dynamic showcase of 33 custom array functions written in Thyme, each encapsulated in interactive boxes that cycle through five informative states: Description, Usage, Example, Results, and Code. It serves as both a reference and a hands-on learning tool for array manipulation in Thyme’s functional style.
Function Categories Include:
Creation & Structure: Generate arrays with or without repetition (`_ra_randWithRep`, `_ra_randNoRep`), chunk arrays (`_ra_chunk`), flatten nested arrays (`_ra_flatten`), and zip/unzip multiple arrays (`_ra_zip`, `_ra_unzip`).
Modification & Access: Insert, remove, set, append, and swap elements (`_ra_insert`, `_ra_pop`, `_ra_set`, `_ra_append`, `_ra_swap`).
Search & Evaluation: Find values, check existence, count occurrences, and evaluate boolean conditions (`_ra_find`, `_ra_elemExists`, `_ra_count`, `_ra_anyIsTrue`, `_ra_allIsTrue`).
Math & Aggregation: Compute sum, average, min/max, and combined min-max (`_ra_sum`, `_ra_ave`, `_ra_min`, `_ra_max`, `_ra_min_max`).
Functional Programming Tools: Filter and transform arrays using custom logic (`_ra_filter`, `_ra_map`).
Sorting & Shuffling: Sort arrays using bubble sort (`_ra_sort`) and randomize order (`_ra_shuffle`).
Looping Constructs: Core recursive utilities like `_xFor`, `_xWhile`, and `_xFor2Step` power most of the logic behind these functions.
Each function is designed to mirror familiar array operations from languages like Python or JavaScript, but implemented in Thyme’s unique syntax and recursive paradigm. The scene is ideal for learners, tinkerers, and developers looking to understand or extend Thyme’s capabilities. |