Browse Source

Modification retourn append et prepend pour enchainer

Arthur Brandao 6 năm trước cách đây
mục cha
commit
df3d25e2da
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  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;
 	}
 	
 	/**