Jump to content
  • ×   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.

  • Similar Topics

    • By Andy
      I'm new here.
      I'm on the demo and doing fine but for the life of me I can't figure out what the n integer does after :seed?
      I know seed fixes a random function so it is repeatable but what does that number do? I tried changing it in Tutorial 5 but I can't make sense of it!
    • By Andy
      I'm starting to loose the will to progress.
      So I just spent an hour trying to evaluate this and getting errors and thinking I'd got the wrong number of brackets and yet it looks fine.
      (setf motifx12 (rnd-order (gen-repeat 12 (list motif)))) :seed3) 
      And then I realise that I have to place the cursor not on the final bracket but on the one before :seed3)
      Nowhere does it say this in the manual as far as I can tell.
      And why?
      I think it's something to do with the : colon that I don't understand in the language. And I still don't understand seed.
      I'm really trying to get to grips with lisp but my hair is on fire. 😞
    • By PatrickMimran
      I try to put a seed as an option in this function with a default value of nil or no seed , how may i add it as optional 
      Thanks  Patrick  
      (defun patkaos ( seed lambda long )
       (let ((res (cons seed nil)) (xn seed))
          (dotimes (n long res) (setf res (cons (setf xn (* lambda xn (- 1 xn))) res)))
          (reverse res)))
  • Create New...