fork download
  1. (defun neql (a b)
  2. (not (eql a b))
  3. )
  4.  
  5. (defun even (array)
  6. (cond
  7. ((null array) array)
  8. ((eql 0 (mod (car array) 2)) (cons (car array) (even (cdr array))))
  9. (t (even (cdr array)))
  10. )
  11. )
  12.  
  13. (defun odd (array)
  14. (cond
  15. ((null array) array)
  16. ((neql 0 (mod (car array) 2)) (cons (car array) (odd (cdr array))))
  17. (t (odd (cdr array)))
  18. )
  19. )
  20.  
  21. (defun even_odd (array) (list (odd array) (even array)))
  22.  
  23. (defvar lst)
  24. (setq lst '(1 2 3 4 5 6 7 8 9 10))
  25. (print (even_odd lst))
Success #stdin #stdout #stderr 0.01s 9628KB
stdin
stdout
((1 3 5 7 9) (2 4 6 8 10)) 
stderr
Warning: reserving address range 0x80000c0000...0x1fffffffffff that contains memory mappings. clisp might crash later!
Memory dump:
  0x8000000000 - 0x80000bffff
  0x151e77400000 - 0x151e776e4fff
  0x151e77815000 - 0x151e77839fff
  0x151e7783a000 - 0x151e779acfff
  0x151e779ad000 - 0x151e779f5fff
  0x151e779f6000 - 0x151e779f8fff
  0x151e779f9000 - 0x151e779fbfff
  0x151e779fc000 - 0x151e779fffff
  0x151e77a00000 - 0x151e77a02fff
  0x151e77a03000 - 0x151e77c01fff
  0x151e77c02000 - 0x151e77c02fff
  0x151e77c03000 - 0x151e77c03fff
  0x151e77c80000 - 0x151e77c8ffff
  0x151e77c90000 - 0x151e77cc3fff
  0x151e77cc4000 - 0x151e77dfafff
  0x151e77dfb000 - 0x151e77dfbfff
  0x151e77dfc000 - 0x151e77dfefff
  0x151e77dff000 - 0x151e77dfffff
  0x151e77e00000 - 0x151e77e03fff
  0x151e77e04000 - 0x151e78003fff
  0x151e78004000 - 0x151e78004fff
  0x151e78005000 - 0x151e78005fff
  0x151e78045000 - 0x151e78048fff
  0x151e78049000 - 0x151e78049fff
  0x151e7804a000 - 0x151e7804bfff
  0x151e7804c000 - 0x151e7804cfff
  0x151e7804d000 - 0x151e7804dfff
  0x151e7804e000 - 0x151e7804efff
  0x151e7804f000 - 0x151e7805cfff
  0x151e7805d000 - 0x151e7806afff
  0x151e7806b000 - 0x151e78077fff
  0x151e78078000 - 0x151e7807bfff
  0x151e7807c000 - 0x151e7807cfff
  0x151e7807d000 - 0x151e7807dfff
  0x151e7807e000 - 0x151e78083fff
  0x151e78084000 - 0x151e78085fff
  0x151e78086000 - 0x151e78086fff
  0x151e78087000 - 0x151e78087fff
  0x151e78088000 - 0x151e78088fff
  0x151e78089000 - 0x151e780b6fff
  0x151e780b7000 - 0x151e780c5fff
  0x151e780c6000 - 0x151e7816bfff
  0x151e7816c000 - 0x151e78202fff
  0x151e78203000 - 0x151e78203fff
  0x151e78204000 - 0x151e78204fff
  0x151e78205000 - 0x151e78218fff
  0x151e78219000 - 0x151e78240fff
  0x151e78241000 - 0x151e7824afff
  0x151e7824b000 - 0x151e7824cfff
  0x151e7824d000 - 0x151e78252fff
  0x151e78253000 - 0x151e78255fff
  0x151e78258000 - 0x151e78258fff
  0x151e78259000 - 0x151e78259fff
  0x151e7825a000 - 0x151e7825afff
  0x151e7825b000 - 0x151e7825bfff
  0x151e7825c000 - 0x151e7825cfff
  0x151e7825d000 - 0x151e78263fff
  0x151e78264000 - 0x151e78266fff
  0x151e78267000 - 0x151e78267fff
  0x151e78268000 - 0x151e78288fff
  0x151e78289000 - 0x151e78290fff
  0x151e78291000 - 0x151e78291fff
  0x151e78292000 - 0x151e78292fff
  0x151e78293000 - 0x151e78293fff
  0x560e7c577000 - 0x560e7c667fff
  0x560e7c668000 - 0x560e7c771fff
  0x560e7c772000 - 0x560e7c7d1fff
  0x560e7c7d3000 - 0x560e7c801fff
  0x560e7c802000 - 0x560e7c832fff
  0x560e7c833000 - 0x560e7c836fff
  0x560e7e4fb000 - 0x560e7e51bfff
  0x7ffc93732000 - 0x7ffc93752fff
  0x7ffc937b4000 - 0x7ffc937b7fff
  0x7ffc937b8000 - 0x7ffc937b9fff