- The snippets are under the CC-BY-SA license.
- Please consider keeping a bookmark
- (instead of printing)
Print a literal string on standard output
Loop to execute some code a constant number of times
Check if the list contains the value x.
list is an iterable finite container.
Access each key k with its value x from an associative array mymap, and print them.
Write a loop that has no end clause.
This a bit strange, repeat is a predicate that will always succeed, that is always true.
`repeat/0` succeeds an infinite number of times, and each time is immediately foiled by false/0. The default execution strategy just tries clauses in order from left to right so this induces an infinite loop.
Basic implementation of the Echo program: Print all arguments except the program name, separated by space, followed by newline.
The idiom demonstrates how to skip the first argument if necessary, concatenate arguments as strings, append newline and print it to stdout.
Print each key k with its value x from an associative array mymap, in ascending order of k.
Print each key k with its value x from an associative array mymap, in ascending order of x.
Note that multiple entries may exist for the same value x.