Permalink
Browse files

More interesting example for nextMethod option.

  • Loading branch information...
1 parent 167ecdf commit 827c6633c93e4b131971ca7644fd6868c16a7b82 Michael committed Mar 11, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 README.md
View
@@ -126,9 +126,9 @@ Determines if the end value is included as part of the range in all instance met
### nextMethod
An optional function to use instead of the Class's next method. Allows for some very interesting ranges. Defaults to (begin.next || $lambda($chk(end) ? end : begin)).
- new Range(1,9,{nextMethod:function(){
- return this+2;
- }}).toArray().join(',') // "1,3,5,7,9"
+ new Range(2,250,{nextMethod:function(){
+ return this.pow(1.2).ceil();
+ }}).toArray().join(',') // "2,3,4,6,9,14,24,46,99,249"
Known Issues

0 comments on commit 827c663

Please sign in to comment.