Last active
August 8, 2016 11:18
-
-
Save roryl/947eeaf158db69f021f983925fcd1813 to your computer and use it in GitHub Desktop.
Lucee Parallel Functions Example
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
component { | |
} |
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
<cfscript> | |
myArray = [1,2,3,4,5,6]; | |
writeDump(myArray); | |
flipped = myArray.map(function(value){ | |
return value * -1; | |
}); | |
writeDump(flipped); | |
</cfscript> |
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
<cfscript> | |
myArray = [] | |
loop from="1" to="100" index="i"{ | |
myArray.append(randRange(1,10)); | |
} | |
timer type="inline"{ | |
flipped = myArray.map(function(value){ | |
// sleep(100); | |
return value * -1; | |
}); | |
} | |
</cfscript> |
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
<cfscript> | |
myArray = [] | |
loop from="1" to="100" index="i"{ | |
myArray.append(randRange(1,10)); | |
} | |
timer type="inline"{ | |
flipped = myArray.map(function(value){ | |
// sleep(100); | |
return value * -1; | |
}, true); | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment