Path: csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Wait on keyboard Date: Sat, 12 Mar 2016 04:44:10 +0100 Organization: PointedEars Software (PES) Lines: 31 Message-ID: <9658502.p6PyTM0SGn@PointedEars.de> References: <6ef267d6-7655-4699-9363-d6e0f613f899@googlegroups.com> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1457754251 7384 eJwFwQcBADAIAzBLsJaCHXbwL2FJQK6TVIgxMRsW1RVTmele5Bs3+X66c2GNRWtipWwd4AMFZBAB (12 Mar 2016 03:44:11 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sat, 12 Mar 2016 03:44:11 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwVyckRACEMA7CWILENtEOO/ktgd0Y/0TUVC6LAZtcvVZGsU/ITAIvW6ffeNJsgN9yzv0ms9tWmPRSbGOcBcukVfg== Cancel-Lock: sha1:0BTAS8WXQuWovjfa3ntL68r63Mo= X-NNTP-Posting-Host: eJwNwokRwDAIA7CVMI9JxykE9h+hPSmMYKcz6LG/aVc9W1vPhcqpiITgHeSQ1oObuJJKXZv8ABp3EMo= Xref: csiph.com comp.lang.javascript:29928 Stefan Weiss wrote: > With a little generator magic, you can make individual functions > pause-able: > > var jonas = S(function* (start, max) In which ECMAScript implementation is this not a syntax error, and if there is any, what does it mean there? > { I prefer and recommend to write the opening brace of a function expression on the same line as the “function” keyword, if possible, to distinguish it from a function declaration. > […] > PS (group): I hacked this function together rather quickly. Or is this the explanation for the quoted code? > It works, but I'm sure it can be improved quite a bit. If you find > anything, I'd love to hear about it. You’re welcome. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.