std-position


Synopsis

(std-position <x> <lst>)

Description

std-position returns the first found position (index) of x in lst. It returns either an integer number or nil if not found. If x is the car of lst, then 0 is returned.

Possible Extension

std-position might support strings too. Lisp versions of position accept strings too but the known Vital Lisp /Visual Lisp extension not. We better use std-strpos for strings for now.

Examples

(std-position 2 '(0 1 2 3))   => 2
(std-position 'a '(0 1 2 3))  => nil

Arguments

x: any lisp expression.

lst: any proper list.

Return Value

An integer number or nil.

Side Effects

None.

Module

(std-require 'STDLIST)

Defined in STDLIST

#+ VLISP == vl-position

#+ VILL == vlx-position