public Ar Filter(Func<dynamic, bool> method) { Ar newAr = new Ar(); for (int i = this.Count - 1; i >= 0; i--) { if (method(this[i])) newAr.Push(this[i]); } return newAr; }
public Ar Map(Func<dynamic, int, dynamic> method) { Ar newAr = new Ar(); for (int i = 0; i < this.Count; i++) { newAr.Push(method(this.Get(i), i)); } return newAr; }
public Ar Slice(int start, int end) { Ar newAr = new Ar(); if (start < 0) start = this.Count - start; if (end < 0) end = this.Count - end; for (int i = start; i < end; i++) { newAr.Push(this[i]); } return newAr; }
public Ar Map(Func<dynamic, dynamic> method) { Ar newAr = new Ar(); foreach (dynamic item in this) { newAr.Push(method(item)); } return newAr; }