| File | lookup.str |
| Author | unknown |
| Since | unknown |
| 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) | ||||||||||||
Find first element of a list to which s applies.The result is the application of s to this element.
|
|||||||||||||
| ATerm | lookup | ||||||||||||
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"
|
|||||||||||||
| ATerm | lookup(Strategy keyeq) | ||||||||||||
Looks up the first value associated with a particular keyin an associative list, using keyeq to do key comparisons.
|
|||||||||||||