This is the continuation of simple Lali[0] snippets.
Here are two distinct functions, 'on' and 'in'. They return a sub-list of the LST list, from the element EL until the end or until the beginning (respectively).
(defun on (el lst)
(fill
((differ el (car lst)) lst)
((space lst) (on el (cdr lst)))
('f 'f)))
(defun in (el lst)
(on el (reverse lst)))
Here is an action (of it) at Lali REPL:
lali> (set 'numerals '(+0 +1 +2 +3 +4 +5 +6 +7 +8 +9))
(+0 +1 +2 +3 +4 +5 +6 +7 +8 +9)
lali> (on () numerals)
()
lali> (in () numerals)
()
lali> (on +3 numerals)
(+3 +4 +5 +6 +7 +8 +9)
lali> (in +3 numerals)
(+3 +2 +1 +0)
[0] git clone http://tilde.club/~keyboardan/git/lali.git
tags: #lali #lalilambda #lambda #on #in
keyboardan
gopher://tilde.club/1/~keyboardan/
http://tilde.club/~keyboardan/