Search found 8 matches

by Ehsan
Sun Aug 26, 2012 12:42 am
Forum: Homework
Topic: Random function
Replies: 2
Views: 8149

Random function

Hi everyone . I want to make an array inside a struct and randomly generate initial states.
by Ehsan
Wed Jul 25, 2012 11:46 am
Forum: Homework
Topic: cons
Replies: 6
Views: 15228

Re: cons

tnx everyone . I created this instruction , but this is very confusing :D

(cons 1 (cons (cons 2 (cons 6 (cons 7 (cons 8 ()))))(cons 3 ( cons (cons 4 (cons 9 (cons (cons 12())())))(cons(cons 5(cons 10 (cons 11()))) ())))))


(1 (2 6 7 8) 3 (4 9 (12)) (5 10 11))
by Ehsan
Mon Jul 23, 2012 2:31 am
Forum: Homework
Topic: Tree and linked list in lisp
Replies: 2
Views: 8225

Tree and linked list in lisp

Hi every one . I'm beginner in lisp and I need a references about how to build data structure like tree or graph and implement search like breadth first search .

Can any one tell me good Reference


tnx
by Ehsan
Mon Jul 23, 2012 2:26 am
Forum: Homework
Topic: cons
Replies: 6
Views: 15228

Re: cons

tnx . i found how to build a nested list
by Ehsan
Sun Jul 22, 2012 10:53 am
Forum: Homework
Topic: cons
Replies: 6
Views: 15228

cons

Hi every . i have question about cons in lisp . how can i make this list
(1 (4 9 (12) ))

i used this rule (cons 1 (cons (cons 4 (cons 9 (cons (cons 12()))) ()) ())) but interpreter return error :(
by Ehsan
Sat Jul 14, 2012 2:16 am
Forum: Homework
Topic: String + 1
Replies: 1
Views: 7265

String + 1

Hi everyone . i need to write a function in lisp that receive string and then add 1 to each characters. for example "2a6c12" and then return "3b7d23". i write this function (defun my-list(f) (loop for x across f collect(code-char(+ 1 (char-code x))))) but my output like this (#\3...
by Ehsan
Sat Jul 14, 2012 12:12 am
Forum: Homework
Topic: counts number in a list
Replies: 3
Views: 10185

Re: counts number in a list

Tnxxxxxxxxxxxxxxxxxxxxxxxx
by Ehsan
Thu Jul 12, 2012 7:44 am
Forum: Homework
Topic: counts number in a list
Replies: 3
Views: 10185

counts number in a list

Hi every one

I need a function count numbers in a list for example
(count-numbers '(3 4 5 a b c d 6 ) ) -> 4