All pastes #260158 Raw Edit

Mine

public java v1 · immutable
#260158 ·published 2006-11-28 01:55 UTC
rendered paste body
public class IntList {   int item;  IntList next; IntList(int item, IntList next) {    this.item = item;   this.next = next; }   static IntList empty = null; static boolean isEmpty(IntList l) {  return l == empty; } ========== creating lists of elements ========  IntList l1 = new IntList(1,empty);  IntList l2 = new IntList(2,l1);    .    .    . =============================================static int getElement(int n, IntList l) P  if (n==0)   return l.item;  else   return getElement(n-1, l.nextl}