On Tue, Jan 22, 2013 at 11:56 AM, John Cowan <co...@mercury.ccil.org> wrote: > Alan Manuel Gloria scripsit: > >> We could also use one of the later techniques I eventually settled on: >> have readers return a one-item list to mean "got a datum, here it is!" >> or an empty list to mean "didn't get a datum". It complicates all >> actions, admittedly - now you have to unwrap the return value - but >> avoids special marker cons cells. > > Alternatively (and most Schemely / Common Lisply in my view): If you > have a value, return it; if you don't have a value, return zero values.
But to receive it, you'd have to use something like: call-with-values ! lambda () ! ! i-expr port whatever ! lambda args $ cond ! ! null?(args) $ do-whatever-with-no-value ! ! else $ do-whatever-with $ car args Which strikes me as more complex than: let ! $ args $ i-expr port whatever ! cond ! ! null?(args) $ do-whatever-with-no-value ! ! else $ do-whatever-with $ car args Sincerely, AmkG ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss