index ... +index

Sergey ShishkinSergey Shishkin
1 min read

+index - абстрактный базовый класс всех индексных отношений B-Tree базы данных (префиксный класс для +relation). Иерархия классов включает +Key, +Ref, +Idx и +IdxFold.

(isa '+index Rel)  # Check for an index relation

index - возвращает позицию cnt any в lst или NIL, если any не найден

(index 'any 'lst) -> cnt | NIL

: (index 'c '(a b c d e f))
-> 3
: (index '(5 6) '((1 2) (3 4) (5 6) (7 8)))
-> 3

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

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

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