title: Lisp list in java
body: <p>I have made an attempt at writing this code but it doesn't seem to do much, am kind of new to the concept of lisp lists therefore i don't quiet understand what i should be doing, anyways here is what i have tried:</p>
  
  <pre><code>    import java.util.*;
      public class removNum{
        public static void main(String[] args){
          Scanner in = new Scanner(System.in);
          System.out.println("Enter a list (of integers): ");
          String str = in.nextLine();
          LispList&lt;Integer&gt; list = parseIntLispList(str);
          System.out.println("The list you entered is:");
          System.out.println(list);
          System.out.println("Enter an integer:");
          list = removePos(list);
          System.out.println(list); 
       }
       public static LispList&lt;Integer&gt; parseIntLispList(String str){
         String line = str.trim();
         String contents = line.substring(1,line.length()-1).trim();
         if(contents.length()==0)
            return LispList.empty();
         String[] nums = contents.split(",");
         LispList&lt;Integer&gt; list = LispList.empty();
         for(int i=nums.length-1; i&gt;=0; i--){
            String num = nums[i].trim();
            list = list.cons(Integer.parseInt(num));
         }
         return list;
       }
       public static LispList removePos(LispList list, int n){
          if(0==n){
           return list.getTail();
          }
         else{
           return new LispList(list.getHead(),removePos(list.getTail(),n-1));
         }
       }
    }
  </code></pre>
  
  <p>Well basically what i'm trying to do is to write a recursive method which takes a list and an integer x, and deletes the integer at position x in the list, e.g. if the list is [2,5,6,40,8,9,45] and the integer is 2, the method should return [2,5,40,8,9,45] so integer at the position 2 is removed from the list.</p>
  
  <p>I don't expect anyone to write up the solution for me but a nudge in the right direction would be greatly appreciated. Thanks in advance.</p>