mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 19:33:46 +00:00
library/cord.m:
Add is_singleton/2, foldr2/6 and foldr3/8.
NEWS:
Announce the above additions.
tests/hard_coded/Mmakefile:
tests/hard_coded/test_cord3.{m,exp}:
Add a test of is_singleton/2 (and is_empty/1).
12 lines
301 B
Plaintext
12 lines
301 B
Plaintext
Empty is empty.
|
|
Singleton1 is not empty.
|
|
Singleton2 is not empty.
|
|
NonSingleton1 is not empty.
|
|
NonSingleton2 is not empty.
|
|
|
|
Empty is not a singleton.
|
|
Singleton1 is a singleton with element 1.
|
|
Singleton2 is a singleton with element 2.
|
|
NonSingleton1 is not a singleton.
|
|
NonSingleton2 is not a singleton.
|