diff --git a/stdlib/helpers.lm b/stdlib/helpers.lm index a429789dc..22820b4ac 100644 --- a/stdlib/helpers.lm +++ b/stdlib/helpers.lm @@ -100,17 +100,11 @@ ::yield-cons := λhead tail. ( head # this is head - ::show-cons ::close-this - ::open-this - ::show-cons - \t mov %r8, %r9 \n # %r9 is head + tail # this is tail - ::show-cons - ::close-this - ::open-this - ::show-cons + ::close-this # %r8 is tail \t mov $0, %r12 \n # this.atom is NULL \t mov %r9, %r13 \n # this.head is head diff --git a/stdlib/prelude.lm b/stdlib/prelude.lm index 587044bb6..184affca1 100644 --- a/stdlib/prelude.lm +++ b/stdlib/prelude.lm @@ -41,12 +41,14 @@ ::push-this \t mov %r13, %r8 \n ::open-this + ::show-cons ::pop-this - # print head + # print tail ::push-this \t mov %r14, %r8 \n ::open-this + ::show-cons ::pop-this \t ret \n