]> gitweb.factorcode.org Git - factor.git/commitdiff
cond typo
authorSlava Pestov <slava@factorcode.org>
Tue, 30 Aug 2005 22:24:53 +0000 (22:24 +0000)
committerSlava Pestov <slava@factorcode.org>
Tue, 30 Aug 2005 22:24:53 +0000 (22:24 +0000)
CHANGES.html
TODO.FACTOR.txt
library/collections/sequences-epilogue.factor

index 015349216997ee28d9cfe4d402a67f7893aacd91..157ec54feae36197dabdd28e49734938a20d6220 100644 (file)
@@ -64,7 +64,7 @@ make-sbuf    ==&gt; SBUF" " make
 <ul>
 <li>New <code>sleep ( ms -- )</code> word pauses current thread for a number of milliseconds.</li>
 <li>New <code>with-datastack ( stack word -- stack )</code> combinator.</li>
-<li>New <code>cond ( conditions -- )</code> combinator. It behaves like a set of nested <code>ifte</code>s; see its documentation comment for details. Note that it does not compile.</li>
+<li>New <code>cond ( conditions -- )</code> combinator. It behaves like a set of nested <code>ifte</code>s, and compiles if each branch has the same stack effect. See its documentation comment for details.</li>
 <li>Erlang/Termite-style concurrency library in <code>contrib/concurrency</code> (Chris Double).</li>
 <li>Completely redid infix algebra in <code>conrib/algebra/</code>. Now, vector operations are possible
 and the syntax doesn't use so many spaces. New way to write the quadratic formula:
index 54c76e0fac251817293c48fae95047b5d4d4ed1c..5aa9266a9e6f226cc7a80228b8200c000fe6288f 100644 (file)
@@ -56,7 +56,6 @@
 \r
 - flushing optimization\r
 - compile-byte/cell: instantiating aliens\r
-- inference needs to be more robust with heavily recursive code\r
 - fix fixnum<< and /i overflow on PowerPC\r
 - simplifier:\r
   - kill replace after a peek\r
index b1c8bfe7318123b431f07af6ae80aa2aba516a0c..83ef63fdb4f9233c99f84db04a28972cef5e39ae 100644 (file)
@@ -241,7 +241,8 @@ IN: kernel
     #! { { [ X ] [ Y ] } { [ Z ] [ T ] } }
     #! => X [ Y ] [ Z [ T ] [ ] ifte ] ifte
     #! The last condition should be a catch-all 't'.
-    [ first call ] find nip [ second call ] [ no-cond ] ifte ;
+    [ first call ] find nip dup
+    [ second call ] [ no-cond ] ifte ;
 
 : with-datastack ( stack word -- stack )
     datastack >r >r set-datastack r> execute