From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9386693ac86aaaf3,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-01 00:53:57 PST Newsgroups: comp.lang.ada Path: sparky!uunet!munnari.oz.au!news.Hawaii.Edu!ames!saimiri.primate.wisc.edu!sal.wisc.edu!rat!zeus!cymbal.calpoly.edu!mhaar From: mhaar@cymbal.calpoly.edu (Malcolm S Haar) Subject: Help with combinations... Message-ID: <1993Mar01.085357.130319@zeus.calpoly.edu> Sender: news@zeus.calpoly.edu Organization: California Polytechnic State University, San Luis Obispo Date: Mon, 01 Mar 1993 08:53:57 GMT Date: 1993-03-01T08:53:57+00:00 List-Id: I am trying develop a function that will return all n-length unique combinations of a given set of items. My goal is: function (pointer_to_list_of_items,n) return pointer_to_list_of_combinations ----- if n = 2, and pointer_to_list_of_items points to a list: A,B,C then the function will return a pointer to: A,B A,C B,C ---- The pointers, etc. are not of concern to me -- I know how to use them. Also, I can implement the function for a constant n. I would, however, like to be able to create a function like the one shown above, which would allow for any n. Thanks in advance for any help. Malcolm mhaar@oboe.calpoly.edu