select.ijs

Script: ~addons/finexec/finexec/toolbox/select.ijs
Contributor: William Szuch
Updated: 2022 6 26
Depend: nil
Definitions: loaded to locale base
Status: done
Script source: select.ijs

Definitions for selecting data from a list.

Definitions

S sel, selb, selb1, selb2, selb3, selb4, selb5, selx0, selx1, selx2, selx3, selx4, selx5, sely0, sely1, sely2, sely3, sely4, sely5

sel (dyad)

Form: tacit

Select one or more items from a list.

Syntax

(I)sel(L)
I = index numbers for items to be selected from the list: index numbers start at 0
L = list of items

Example

   (0)sel(1;2;3;4)
┌─┐
│1│
└─┘
   (0 2 1)sel(1 2 3 4 5)
1 3 2
   (3)sel(1;2;3;'asd';'fgh')
┌───┐
│asd│
└───┘
   (0 1 2)sel(1;2;3;'asd';'fghijk')
┌─┬─┬─┐
│1│2│3│
└─┴─┴─┘
   (3 4)sel(1;2;3;'asd';'fghijk')
┌───┬──────┐
│asd│fghijk│
└───┴──────┘

selb (dyad)

Form: tacit
Select one or more items from a list of items and unbox.

Syntax

(I)selb(L)
I = index numbers of items to be selected: index numbers start at 0
L = list of items

Example

   (0)selb(1;2;3;4)
1
   (3)selb(1;2;3;'asd';'fgh')
asd
   (0 1 2)selb(1;2;3;'asd';'fghijk')
1 2 3
   (3 4)selb(1;2;3;'asd';'fghijk')
asd
fghijk

selb1 (monad)

Form: tacit
Select the 1st item from a list of items and unbox.

Syntax

selb1(L)
L = list of items

Example

   selb1(1;2;3;4;5)
1
   selb1('asd';2;3;4;5)
asd

selb2 (monad)

Form: tacit
select the 2nd item from a list of items and unbox.

Syntax

selb2(L)
L = list of items

Example

   selb2(1;2;3;4;5)
2
   selb2('asd';'dfg';3;4;5)
dfg

selb3 (monad)

Select the 3rd item from a list of items and unbox.

Syntax

selb3(L)
L = list of items

Example

   selb3(1;2;3;4;5)
3
   selb3('asd';'dfg';'hjk';4;5)
hjk

selb4 (monad)

Form: tacit
Select the 4th item from a list of items and unbox.

Syntax

selb4(L)
L = list of items

Example

   selb4(1;2;3;4;5)
4
   selb4('asd';'dfg';'hjk';'qqq';5)
qqq

selb5 (monad)

Form: tacit
Select the 5th item from a list of items and unbox.

Syntax

selb5(L)
L = list of items

Example

   selb5(1;2;3;4;5)
4
   selb5('asd';'dfg';'hjk';'qqq';'www')
www

selx0 (dyad)

Form: tacit
Select all left items from left and right lists of items.

Syntax

(L)selx0(R)
L = left list of items
R = right list of items

Example

   (1 2 3 4 5)selx0(6 7 8 9 10)
1 2 3 4 5
   (1 2 3 4;5)selx0(6 7 8 9 10)
┌───────┬─┐
│1 2 3 4│5│
└───────┴─┘

selx1 (dyad)

Form: tacit
Select 1st left item from left and right lists of items.

Syntax

(L)selx1(R)
L = left list of items
R = right list of items

Example

   (1 2 3 4 5)selx1(6 7 8 9 10)
1
   (1 2 3 4;5)selx1(6 7 8 9 10)
┌───────┬
│1 2 3 4│
└───────┴

selx2 (dyad)

Form: tacit
Select 2nd left item from left and right lists of items.

Syntax

(L)selx2(R)
L = left list of items
R = right list of items

Example

   (1 2 3 4 5)selx2(6 7 8 9 10)
2
   (1 2 3 4;5;6;7;8)selx2(6 7 8 9 10)
┌─┐
│5│
└─┘

selx3 (dyad)

Form: tacit
Select 3rd left item from left and right lists of items.

Syntax

(L)selx3(R)
L = left list of items
R = right list of items

Example

   (1 2 3 4 5)selx3(6 7 8 9 10)
3
   (1 2 3 4;5;6;7;8)selx3(6 7 8 9 10)
┌─┐
│6│
└─┘

selx4 (dyad)

Form: tacit
Select 4th left item from left and right lists of items.

Syntax

(L)selx4(R)
L = left list of items
R = right list of items

Example

   (1 2 3 4 5)selx4(6 7 8 9 10)
4
   (1 2 3 4;5;6;7;8)selx4(6 7 8 9 10)
┌─┐
│7│
└─┘

selx5 (dyad)

Form: tacit
Select 5th left item from left and right lists of items.

Syntax

(L)selx5(R)
L = left list of items
R = right list of items

Example

   (1 2 3 4 5)selx5(6 7 8 9 10)
5
   (1 2 3 4;5;6;7;8)selx5(6 7 8 9 10)
┌─┐
│8│
└─┘

sely0 (verb)

Form: tacit
Select all right items.

Syntax

([L])sely0(R)
L = optional left list of items
R = right list of items

Example

   (1 2 3 4 5)sely0(6 7 8 9 10)
6 7 8 9 10
   sely0(6 7 8 9 10)
6 7 8 9 10

sely1 (verb)

Form: tacit
Select 1st right item.

Syntax

([L])sely1(R)
L = optional left list of items
R = right list of items

Example

   (1 2 3 4 5)sely1(6 7 8 9 10)
6
   sely1(6 7 8 9 10)
6

sely2 (verb)

Form: tacit
Select 2nd right item.

Syntax

([L])sely2(R)
L = optional left list of items
R = right list of items

Example

   (1 2 3 4 5)sely2(6 7 8 9 10)
7
   sely2(6 7 8 9 10)
7

sely3 (verb)

Form: tacit
Select 3rd right item.

Syntax

([L])sely3(R)
L = optional left list of items
R = right list of items

Example

   (1 2 3 4 5)sely3(6 7 8 9 10)
8
   sely3(6 7 8 9 10)
8

sely4 (verb)

Form: tacit
Select 4th right item.

Syntax

([L])sely4(R)
L = optional left list of items
R = right list of items

Example

   (1 2 3 4 5)sely4(6 7 8 9 10)
9
   sely4(6 7 8 9 10)
9

sely5 (verb)

Form: tacit
Select 5th right item.

Syntax

([L])sely5(R)
L = optional left list of items
R = right list of items

Example

   (1 2 3 4 5)sely5(6 7 8 9 10)
10
   sely5(6 7 8 9 10)
10