New to lisp, help with function
Posted: Tue Nov 29, 2011 3:14 pm
Hi everyone, i'm new to Lisp, comming from other programming languages, so i'm still not getting along with the recursive aspect of lisp.
I need help with a function, i want to verify if a particular list of lists is valid. In this list of lists, the first element as a size of 3, and every element after grows in a proportion of 3*N, with N being the number of the element. as an example, if the list as 4 elements, the first will be size 3, the second 6, the third 9 and the fourth 12.
I know that to verufy this condition i need to use a recursive function, but until now i'm not being able to do it.
This function receives a list and returns a boolean, T or F, case the list being valid or not.
Can someone help me?
Thx in advance,
C. Ribeiro
I need help with a function, i want to verify if a particular list of lists is valid. In this list of lists, the first element as a size of 3, and every element after grows in a proportion of 3*N, with N being the number of the element. as an example, if the list as 4 elements, the first will be size 3, the second 6, the third 9 and the fourth 12.
I know that to verufy this condition i need to use a recursive function, but until now i'm not being able to do it.
This function receives a list and returns a boolean, T or F, case the list being valid or not.
Can someone help me?
Thx in advance,
C. Ribeiro