Commit Graph

4 Commits

Author SHA1 Message Date
Aryadev Chavali
cb7dacccfa rev-map function
Given an indicator function (A->B) and a list of items of A, return
an association list associating B to the elements that map to it;
essentially the inverse map of the indicator.
2025-02-11 00:40:19 +00:00
Aryadev Chavali
279437cb81 Implement split function.
Given a list and index into that list, return a cons where the car is
all elements up to that index (exclusive) and the cdr is the rest of
the list.
2025-02-11 00:40:19 +00:00
Aryadev Chavali
2d49ed25ac Implement a "take" function to read subsequences of a list
Basically a wrapper over subseq but for when using `->>` as the list
is the last parameter.
2025-02-11 00:40:19 +00:00
Aryadev Chavali
ef572b992b Introduce lib.functions which includes helper functions
Splitting macros and functions into different packages and source code
makes it easier to look at.   Functions currently implemented:
- range: like Python's range
- parse-integer*: parse-integer but junk-allowed is set to t.
2025-02-11 00:40:19 +00:00