DennisMitchell / jellylanguage

Jelly is a recreational programming language inspired by J.
MIT License
860 stars 47 forks source link

Base Decompression, ṃ #28

Closed jjallan closed 7 years ago

jjallan commented 7 years ago

Dyad expecting an integer and an iterable. Evaluates the integer in base len(iterable) then 1-based-indexes into the same iterable. For non-negative integers the iterable gives the digits of a base [1,2,...,0] into which to convert the number (it still does for negatives, but indexing will then be [-n,-n+1,...,0]. The iterable may be a number, in which case a range will be made - giving base digits [1,2,...N], so 9999ṃ7 is equivalent to 9999b7o7