Lali Lambda: has

I will be starting to write little snippets of Lali[0] code, with the intention of spreading beauty of lambda programming :-) .

Here is the Lisp function 'has', in Lali...

(defun has (el lst)
  (fill
   ((algo el) 'n)
   ((differ el (car lst)) 't)
   ((space (car lst)) (has el (cdr lst)))
   ('f 'f)))
    

This function returns 'n' if EL is empty, 't' if the element EL is part of the list LST. Otherwise, returns 'f'.

[0] git clone http://tilde.club/~keyboardan/git/lali.git

tags: #lali #lalilambda #lambda #has


keyboardan

gopher://tilde.club/1/~keyboardan/
http://tilde.club/~keyboardan/