- The snippets are under the CC-BY-SA license.
- Please consider keeping a bookmark
- (instead of printing)
| Prolog | |||
|---|---|---|---|
| 1 |
Print a literal string on standard output
|
||
| 2 |
Loop to execute some code a constant number of times
|
||
| 12 |
Check if the list contains the value x.
list is an iterable finite container. |
|
|
| 13 |
Access each key k with its value x from an associative array mymap, and print them.
|
|
|
| 19 |
Reverse the order of the elements of the list x.
This may reverse "in-place" and destroy the original ordering. |
||
| 50 |
Write a loop that has no end clause.
|
Alternative implementation:
|
|
| 71 |
Basic implementation of the Echo program: Print all arguments except the program name, separated by space, followed by newline.
Skip the first argument if necessary, concatenate arguments as strings, append newline and print it to stdout. |
||
| 112 |
Print each key k with its value x from an associative array mymap, in ascending order of k.
|
|
|
| 113 |
Print each key k with its value x from an associative array mymap, in ascending order of x.
Multiple entries may exist for the same value x. |
|
|
| 117 |
Set n to the number of elements of the list x.
|
||
| 314 |
Set all the elements in the array x to the same value v
|