Jump to content

Recommended Posts

Posted

Hi,

 

The doc states:

;Note the handling of further nested sublists:

(find-everyother 2 '(((1 2) (3 4) (5 6) (7 8)) 
				   ((1 2) (3 4) (5 6) (7 8) (9 10) (11))))
=> (((1 2) (5 6)) ((1 2) (5 6) (9 10)))

 

when I evaluate it I get:

(find-everyother 2 '(((1 2) (3 4) (5 6) (7 8)) 
				   ((1 2) (3 4) (5 6) (7 8) (9 10) (11))))
=>((1 2 5 6) (1 2 5 6 9 10))

 

What am I missing or how can I achive the upper example?

 

Thanks!

 

ole

Posted

Found it in the meantime, thanks!

 (gen-divide 2 (flatten (find-everyother 2 '(((1 2) (3 4) (5 6) (7 8)) 
				   ((1 2) (3 4) (5 6) (7 8) (9 10) (11))))))
=>((1 2) (5 6) (1 2) (5 6) (9 10))

 

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