This file contains hidden or 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
/** | |
* @file Solution to "A little JavaScript problem" from [lisperator.net]{@link http://lisperator.net/blog/a-little-javascript-problem/}. | |
* | |
* For demonstration. Overdocumented on purpose. Documentation is in a JSDoc-like documentation style. | |
* The solution itself is 7 SLOC. | |
* I also included test code to automatically verify correctness of the solution. | |
* See {@link https://gist.github.com/djedr/68fdaef3cad134788caefac06388534c} for a version without documentation or test code. | |
* | |
* Assumes ES6 support. | |
* Uses nested closures to emulate singly linked lists. |