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
| const example1 = [[1, 1, 1, [1.4, 1.6]], 666, [2, 3, [[4], [5, 6]]]]; | |
| function flat(arr) { | |
| const stack = arr; | |
| const result = []; | |
| while (stack.length) { | |
| const current = stack.shift(); | |
| const isCurrentArray = Array.isArray(current); |
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
| import scala.collection.mutable.PriorityQueue | |
| import scala.math.Ordering._ | |
| import scala.util.Sorting | |
| import Implicits._ | |
| class MyType{ | |
| } | |
| object Implicits { |
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
| var Robot = function(robot) { | |
| this.speed = 30; | |
| }; | |
| Robot.prototype.onIdle = function(ev) { | |
| var robot = ev.robot; | |
| robot.clone(); | |
| robot.ahead(this.speed); | |