diff options
| author | Alon Levy <alon@pobox.com> | 2015-03-02 15:02:04 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-03-02 15:02:04 +0200 |
| commit | 5d572f7a497b9a9d1bef6d20b974288dc645bcb3 (patch) | |
| tree | 79115fdd696f6273e92e193f3c585739e9eb7381 /src/client/textanalysis.js | |
| parent | 48703a295bc76f777faea7a11ad0a9a459f6d26f (diff) | |
util: add text selection and functional utils for later red&blue input
Diffstat (limited to 'src/client/textanalysis.js')
| -rw-r--r-- | src/client/textanalysis.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/client/textanalysis.js b/src/client/textanalysis.js index c4f5053f..fe4b8891 100644 --- a/src/client/textanalysis.js +++ b/src/client/textanalysis.js @@ -2,6 +2,9 @@ define(['rz_core', 'model/core', 'model/util', 'model/diff', 'consts', 'util'], function(rz_core, model_core, model_util, model_diff, consts, util) { "use strict"; +// Aliases +var reduce = util.reduce; + // Constants var node_edge_separator = rz_config.node_edge_separator; var separator_string = rz_config.separator_string; @@ -102,16 +105,6 @@ function group(list, predicate) return ret; } -function reduce(list, initial, func) -{ - var ret = initial; - - for (var i = 0 ; i < list.length; ++i) { - ret = func(ret, list[i]); - } - return ret; -} - function list_get(list, index, def) { var item = list[index]; |
