private LispList member(LispDataType target, LispList list) { target = target.Evaluate(this); for (int i = 0; i < list.Count; ++i) { if (eql(list[i], target)) { return(list.GetRange(i, list.Count - i)); } } return(new LispList()); }
private LispDataType cdr(LispList list) { if (list.IsAtom) { return(list); } if (list.Count == 2 && list.IsDotted) { return(list.Last()); } return(list.GetRange(1, list.Count - 1)); }