Anonymous ID: adcb55 April 13, 2021, 11:18 a.m. No.13417436   🗄️.is 🔗kun

any codefags here

 

Following function removes all elements from list until index

 

default LL<Edrop(int i){

i–;

if(i<0) return this;

if(i>this.length()) return nil();

return this.tail().drop(i);

 

}

 

Now I need a function that keeps all elements until index i

 

default LL<Etake(int i){

 

}