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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
// FlattenInt recursively flattens an arbitrary nested int array. | |
// Instead of defining an overly nested slice from the get-go (eg: [][][][][][][][]int) | |
// we are using an []interface{} and a type switch to resolve types at runtime. |
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
const shadok = n => parseInt(n) | |
.toString(4) | |
.split('') | |
.map(e => ['ga', 'bu', 'zo', 'meu'][e]) | |
.join(' ') |