Skip to main content

find

find(
@llll ? ## required
@items ? ## required
@function null
@size null
@depth null
@minidx 1
@maxidx 1
@idxreject 0
@depthreject 0
@maxcount 0
@unwrap 0
@depthpolicy 0
@recursive 0
@mindepth 1
@maxdepth 1
) -> llll/null
note

find is a built-in function in the bell programming language and is not unique or exclusive to bellplay~.

Retrieves items from an llll, along with their addresses. The return value is an llll composed by two sublists, the first containing the retrieved items, the second containing the addresses. An equality comparison function can be provided through the @function argument, otherwise it performs a stardard comparison.


Arguments

  • @llll [llll] (required)
  • @items [llll/null] (required)
  • @function [function/null] (default: null)
  • @size [llll/null] (default: null)
  • @depth [int/llll/null] (default: null)
  • @minidx [int] (default: 1)
  • @maxidx [int] (default: 1)
  • @idxreject [llll] (default: 0)
  • @depthreject [int] (default: 0)
  • @maxcount [llll] (default: 0)
  • @unwrap [llll] (default: 0)
  • @depthpolicy [int] (default: 0)
  • @recursive [llll] (default: 0)
  • @mindepth [int] (default: 1)
  • @maxdepth [int] (default: 1)

Output

Found elements and their addresses, if any. [llll/null]

warning

find will return null without raising an error if required arguments are not provided.