فهرست منبع

Modification retourn append et prepend pour enchainer

Arthur Brandao 6 سال پیش
والد
کامیت
df3d25e2da
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      src/migl/lisp/LispList.java

+ 4 - 2
src/migl/lisp/LispList.java

@@ -29,16 +29,18 @@ public class LispList{
 	 * Ajoute un element à la fin de la liste
 	 * @param elt
 	 */
-	public void append(Object elt) {
+	public LispList append(Object elt) {
 		this.list = this.list.append(elt);
+		return this;
 	}
 	
 	/**
 	 * Ajoute un element au debut de la liste
 	 * @param elt
 	 */
-	public void prepend(Object elt) {
+	public LispList prepend(Object elt) {
 		this.list = this.list.prepend(elt);
+		return this;
 	}
 	
 	/**