There are probably better ways but a=.<"1 ]#.i.2^#nums a #&.> <nums NB. list as you wish a (+/@#)&.> <nums
Results are boxed, print as you wish. a allows for the empty set, use }.a if you don't want that.
Ralph S On Fri, 10 Aug 2007, Terrence Brannon wrote:
nums =. 379638 76500 127500 996.1542 418590.6139 Now, how can I print every subset of nums along with +/ on that subset? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
