瀏覽代碼

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;
 	}
 	
 	/**