vault backup: 2023-10-11 12:26:17

This commit is contained in:
Louis Gallet 2023-10-11 12:26:17 +02:00
parent b6834e2c29
commit fb14196b8e
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -42,3 +42,13 @@ WITH
`first`return the first element of the list (is equivalent to contents) `first`return the first element of the list (is equivalent to contents)
`tail`remove the first element of the list (eg. fl <- tail (li)) `tail`remove the first element of the list (eg. fl <- tail (li))
`next`return the element after a box (eg. pspt <= next(head(li)))) `next`return the element after a box (eg. pspt <= next(head(li))))
## Array implementation
Let's take a list l = E ; D ; C ; B ; A. An array implementation of the list l will be:
|1|2|3|4|5|
|:----:|:----:|:----:|:----:|:----:|
|A|B|C|D|E|
|5|
The first line of the table is the $n^{th}$ place of the element, the second line is all the element of the list, and the third line is the place of the first element of the list (here E is at the $5^{th}$ position).