From 915eaaf7cdef04559d4a2982272988bd334a682f Mon Sep 17 00:00:00 2001 From: "Brian T. Rice" Date: Sun, 28 Mar 2010 10:08:51 -0700 Subject: [PATCH] Added #isTerminal to all objects to generalize #isSource/#isSink. --- src/core/stream.slate | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/stream.slate b/src/core/stream.slate index 0fa3acf..8b53275 100644 --- a/src/core/stream.slate +++ b/src/core/stream.slate @@ -319,6 +319,9 @@ x@(Root traits) isSource x@(Root traits) isSink [#writer isFoundOn: {x}]. +x@(Root traits) isTerminal +[x isSource \/ [x isSink]]. + source@(Root traits) >> sink [source isSource /\ [sink isSink] ifTrue: [source reader >> sink writer]]. -- 2.11.4.GIT