From 8ba394589dd68f6f5d7195f34bf14573ab95ebf1 Mon Sep 17 00:00:00 2001 From: Kray-G Date: Wed, 31 Mar 2021 17:26:39 +0900 Subject: [PATCH] updated a little some code. --- lib/std/kxenumerable.kx | 2 +- lib/std/kxfunctional.kx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/std/kxenumerable.kx b/lib/std/kxenumerable.kx index 7bdb598f1..df9b66adf 100644 --- a/lib/std/kxenumerable.kx +++ b/lib/std/kxenumerable.kx @@ -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 }; } diff --git a/lib/std/kxfunctional.kx b/lib/std/kxfunctional.kx index 8523bf100..984bdc82a 100644 --- a/lib/std/kxfunctional.kx +++ b/lib/std/kxfunctional.kx @@ -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