Skip to content

Commit

Permalink
updated a little some code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kray-G committed Mar 31, 2021
1 parent 35ff373 commit 8ba3945
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/std/kxenumerable.kx
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ _Enumerable.flatMap = _function(mapping) {
}
var mapped = mapping(value.value);
if (mapped.isArray) {
mapped.flatten().each { &(e) => r.push({ value: e, done: false }) };
mapped.flatten().each(_function(e) { return r.push({ value: e, done: false }); });
} else {
return { value: mapped, done: false };
}
Expand Down
4 changes: 2 additions & 2 deletions lib/std/kxfunctional.kx
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ _Functional.methodMissing = _function(instance, method, ...a) {
// The methods in Array such as `map` have to be assigned to Functional object
// because Array.map will have been called directly instead of Functional.map
// and methodMissing will not be called.
Array.keySet(Array).filter({ => Array[_1].isFunction }).each { &(method)
Array.keySet(Array).filter(_function(a) {return Array[a].isFunction; }).each(_function(method) {
_Functional[method] = _function(...args) {
return _function(obj) {
return obj[method](...args);
};
};
};
});

_Functional.enumerable
= _Functional.Enumerator.create
Expand Down

0 comments on commit 8ba3945

Please sign in to comment.