#RocketLang update:
I implemented some additional library functions, namely:
- `dynamic_type(x)`: returns the actual runtime type of the object. E.g., if the variable x is declared as `SomeProtocol` but you assign an instance of a structure implementing that protocol, it will give you the structure type.
- `is_subtype(T1, T2)` tests if T1 is a subtype of T2, similar to Python's `issubclass()`
- `os.scandir()` for getting the contents of a directory
I also added a generic iterator that works with `ArrayList`s and array `Slice`s. All it needs is that the underlying container can be queried by `container[index]` and can be queried for its length.
(I actually already had this implemented for ArrayLists, just made it more generic to make it work for Slices, too.)
This actually required fixing a "bug" in checking whether a type implements a protocol. Implemented naively, that lead into an infinite recursion. (I was aware of that and had a FIXME in my code.) Now I accidentally triggered that and figured it was a good time to actually fix that.