<h3>Where do I get it?</h3>
-<p>Right now you can find releases of it at: <a href="http://www.cycript.org/debs/">http://www.cycript.org/debs/</a>. This package depends on MobileSubstrate and libffi (both of which are in Cydia).</p>
+<p>Right now you can find releases of it at: <a href="http://www.cycript.org/debs/">http://www.cycript.org/debs/</a>. This package depends on MobileSubstrate and libffi (both of which are in Cydia). Note that Cycript is an open source project, with its source code available at: <a href="http://svn.saurik.com/repos/cycript/trunk/">http://svn.saurik.com/repos/cycript/trunk/</a>. There is an IRC channel at irc.saurik.com, #cycript.</p>
<h3>So, how do I use it?!</h3>
var a=(0+1)*(2*3)+m.a("'");
...</xmp>
+<p>Because Cycript is implemented as a Cycript->JavaScript compiler, it is able to add functionality that may be lacking in the underlying JavaScript implementation. Right now, Cycript supports array comprehensions and for each loops.</p>
+
+<xmp>cy# function range(b, e) { var q = []; for (var i = b; i != e; ++i) q.push(i); return q; }
+cy# ?debug
+debug == true
+cy# e = []; for each (var i in range(1, 4)) e.push(i); e
+e=[];with({$cys:0,$cyt:0}){$cys=range(1,4);for($cyt in $cys){i=$cys[$cyt];e.push(i);}}e;
+[1,2,3]
+cy# evens = [i for each (i in range(0, 21)) if (i % 2 == 0)]
+evens=(function($cyv,i){$cyv=[];(function($cys){$cys=range(0,21);for(i in $cys){i=$cys[i];if(i%2==0)$cyv.push(i);}}());return $cyv;}());
+[0,2,4,6,8,10,12,14,16,18,20]</xmp>
+
<p>In addition to standard JavaScript, you an also access anything in the Objective-C runtime. Attempts have been made, sparingly, to bridge syntax when possible between the two environments. In particular, you may notice interesting properties of arrays, dictonaries, strings, and numbers. Care has been taken to minimize the damage to the object model.</p>
<xmp>cy# var a = [NSMutableArray arrayWithCapacity:4]
cy# (*view)._layer
"<CALayer: 0x228f60>"</xmp>
-<p>Fully-fledged Objective-C classes can also be declared using @class, which blurs the line between Objective-C's @interface and @implementation. Right now, declaring instance variables are not supported, but will be in a future version: for now you must provide an empty variable block.</p>
+<p>Fully-fledged Objective-C classes can also be declared using @implementation, which also takes on functionality of Objective-C's @interface. Right now, declaring instance variables are not supported, but will be in a future version: for now you must provide an empty variable block.</p>
-<xmp>cy# @class TestClass : NSObject {
+<xmp>cy# @implementation TestClass : NSObject {
cy> }
cy> - description {
cy> return "test";
cy# [new TestClass init]
"test"</xmp>
-<p>The @class syntax can also be used to extend existing classes in a manner similar to categories. Note that type signatures, however, are not yet supported, so you end up heavily restricted in what you can add via this mechanism. In this case, one can also use a parenthesized expression as the class name.</p>
+<p>The @implementation syntax can also be used to extend existing classes in the form of an Objective-C category. Note that type signatures, however, are not yet supported, so you end up heavily restricted in what you can add via this mechanism. In this case, one can also use a parenthesized expression as the class name.</p>
-<xmp>cy# @class NSObject
+<xmp>cy# @implementation NSObject (MyStuff)
cy> - description { return "replaced"; }
cy> @end
cy# var o = [new NSObject init]
cy# o
"replaced"
-cy# @class ([o class]) - description { return "again"; } @end
+cy# @implementation ([o class]) (MyStuff) - description { return "again"; } @end
cy# o
"again"</xmp>