I am new in Lisp programming and trying to create sublists from one single list in lisp with pair of odd and even from the list. for example:
I have a list
ListA ("a" "b" "c" "d" "e" "f" "g" "h")
now I want to convert into the following list:
enter code here
ListB ( ("a" "b") ("c" "d") ("e" "f") ("g" "h") )
so always sublist will be generated with the value of ( (first second) (third fourth) (fifth sixth) ............)
I have tried with mutiple ways for example first take out odd item and even item separate and used the function (list (oddlist evenlist)) but not getting above expected values in the above ListB.Could someone please help me in this regard. Your help would be highly appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…