Jump to content

error when gen-integer with step as list


Recommended Posts

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.

 

Link to comment
Share on other sites

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
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