SizeΒΆ
The size of a collection c
(a list, bag, or set) can be found using the
notation |c|
. For example,
Disco> |{1,2,3}|
3
Disco> |{1,2,3} union {2,3,4,4}|
4
Disco> |[2 .. 7]|
6
The size of a collection c
(a list, bag, or set) can be found using the
notation |c|
. For example,
Disco> |{1,2,3}|
3
Disco> |{1,2,3} union {2,3,4,4}|
4
Disco> |[2 .. 7]|
6