lookup

File lookup.str
Author unknown
Since unknown
No information available.




Statistics


General
Lines of code 58
Stratego
Module number 1 (0% documented)
Constructor number 0
Overlay number 0
Strategy number 4 (100% documented)
Rule number 3 (100% documented)
DynamicRule number 0



Strategy summary


getfirst(Strategy s) Find first element of a list to which s applies lookup.str
lookup Lookup the first value associated with a key in an associative list lookup.str
lookup(Strategy keyeq) Looks up the first value associated with a particular key in an associative list, using keyeq to do key comparisons lookup.str



Strategy details


ATerm getfirst(Strategy s)
File lookup.str
Author unknown
Since unknown
 

Find first element of a list to which s applies.The result is the application of s to this element.


type s a -> b
type List(a) -> b

 
ATerm lookup
File lookup.str
Author unknown
Since unknown
 

Lookup the first value associated with a key in an associativelist. An associative list is a list of key-value pairs.

Note: If multiple identical keys exist, only the value for thefirst will be retrieved.

Example:<lookup> (2, [(1, "a"), (2, "b"), (3, "c")]) => "b"


type k * List(k * v) -> v

 
ATerm lookup(Strategy keyeq)
File lookup.str
Author unknown
Since unknown
 

Looks up the first value associated with a particular keyin an associative list, using keyeq to do key comparisons.


type k * List(k * v) -> v