Jump to content

Recommended Posts

Posted

With optional b and step:

(gen-integer -3 12 2)
=> (-3 -1 1 3 5 7 9 11)

(gen-integer -3 12 '(1 2))
=> ((-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12)
    (-3 -1 1 3 5 7 9 11))

 

The second example is giving error:

> Error: The value (1 2) is not of the expected type number.

 

Posted

The output is correct. First list in step 1 the second list in step 2.

You possibly think of:

(gen-integer-step 0 12 '(1 -2 3 1))
=> (0 1 -1 2 3 4 2 5 6 7 5 8)

 

Posted

I expected the two lists.

But in the version I have, evaluating the second example returns an error not the resulting lists.

 

Posted (edited)

Later today I am releasing new Opusmodus version 1.1. Just doing last tests :-)

The function GEN-INTEGER is wrongly documented. Will make the correction, the step is third value.

This is correct and should work in ver. 1.0

(gen-integer '(-3 -3) '(12 11) '(1 2))
=> ((-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12)
	(-3 -1 1 3 5 7 9 11))

 

Edited by Janusz Podrazik

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