Jump to content

unexpected behaviour with gen-combine


Recommended Posts

Hi,

 

I've discovered that if I run the following code:

(list
 (gen-combine '(1/2 1/4) '(1/8 1/16))
 (gen-combine '(1/2 1/3) '(1/4 1/5)))

 

the result is:

 

(((1/2 1/8) (1/4 1/16)) ((1/2 1/4) (1/3 1/3 1/3 1/5 1/5 1/5 1/5 1/5)))

 

whilst I was expecting (and the documentation suggests should be the result):

 

(((1/2 1/8) (1/4 1/16)) ((1/2 1/4) (1/3 1/5)))

 

In general any input that is not of the form 1/2^n  (n>1) generates a sequence of the input elements rather than a single instance.

 

Am I misunderstanding the function or is this a bug?

 

Many thanks for any assistance.

 

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy