Project

General

Profile

Previous Up Next

switch
This function searches in the list of 2-tuples the one which first element is equal to the specific _element_ (it performs a '==' test). It this tuple is found, the function returns the second element of the tuple, else it returns nil.

u1 switch (
[[u0 u1] r1] _list_
u0 _element_
)
Parameters

_list_
list of 2-tuples
_element_
element to search in the list
Return value

value associated to the _element_

Error :

  • EOK if success.