![]() |
|
Navigation |
Synopsis Determine the powerset of a set.
Function
set[set[&T]] power(set[&T] st)
Usage
import Set;
Description Returns a set with all subsets of
s .
Examples
rascal>import Set; ok rascal>power({1,2,3,4}); set[set[int]]: { {}, {1}, {2}, {1,3,4}, {2,3,4}, {1,2,3,4}, {1,2}, {3}, {1,3}, {4}, {2,3}, {1,4}, {1,2,3}, {2,4}, {1,2,4}, {3,4} } Questions
Question [1].
![]() ![]()
Question [2].
![]() ![]() ![]() |