-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finish README and tweak ordering for contrived example
1 parent
e69acf6
commit a2673b4
Showing
6 changed files
with
249 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { map, reduce, someObject } from '../../../../inline-loops.macro'; | ||
|
||
if ( | ||
someObject( | ||
reduce(map(array, value => value * 2), (object, value) => ({ | ||
...object, | ||
[value]: value, | ||
})), | ||
value => value > 100, | ||
) | ||
) { | ||
console.log('I am large!'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
let _result = []; | ||
|
||
for (let _key = 0, _length = array.length, _value; _key < _length; ++_key) { | ||
_value = array[_key]; | ||
|
||
_result.push(_value * 2); | ||
} | ||
|
||
const _fn2 = (object, value) => ({ ...object, | ||
[value]: value | ||
}); | ||
|
||
let _result2 = _result[0]; | ||
|
||
for (let _key2 = 1, _length2 = _result.length, _value2; _key2 < _length2; ++_key2) { | ||
_value2 = _result[_key2]; | ||
_result2 = _fn2(_result2, _value2, _key2, _result); | ||
} | ||
|
||
let _result3 = false; | ||
|
||
let _value3; | ||
|
||
for (let _key3 in _result2) { | ||
_value3 = _result2[_key3]; | ||
|
||
if (_value3 > 100) { | ||
_result3 = true; | ||
break; | ||
} | ||
} | ||
|
||
if (_result3) { | ||
console.log('I am large!'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.