Skip to content

Commit

Permalink
Update stack index
Browse files Browse the repository at this point in the history
  • Loading branch information
ngallagher committed Feb 5, 2019
1 parent 920d951 commit f20dab8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1135,12 +1135,21 @@ module ImageStore {
}
```
Imports can be grouped from the same package using braces. Below is an example of
import groups.
```js
import util.concurrent.{ ConcurrentHashMap, CopyOnWriteArrayList };
import util.{ Map, Set, List };
```
#### Coercion
For interfaces that have only a single method a closure can be coerced to that interface type. This makes for a much simpler and concise syntax similar to that offered by Java closures.
```js
const set = new TreeSet((a,b)->Double.compare(a,b));
const set = new TreeSet(Double::compare);
set.add(1.2);
set.add(2.3);
Expand Down

0 comments on commit f20dab8

Please sign in to comment.