Different

Sergey ShishkinSergey Shishkin
1 min read

diff - возвращает разницу аргументов списка, все элементы lst1, которых нет в lst2.

(diff 'lst1 'lst2) -> lst

: (diff (1 2 3 4 5) (2 4))
-> (1 3 5)
: (diff (1 2 3) (1 2 3))
-> NIL

different/2 - Pilog предикат, который успешен, если два аргумента различны.

: (? (different 3 4))
-> T

https://picolisp.tiddlyhost.com/#diff

0
Subscribe to my newsletter

Read articles from Sergey Shishkin directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Sergey Shishkin
Sergey Shishkin

Всегда чему-то учусь!