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
function makeI(){return function(){};} | |
function makeII(s){return function(){console.log(s);};} | |
var xi1 = makeI(); | |
var xi2 = makeI(); | |
var xii1 = makeII('xii1'); | |
var xii2 = makeII('xii2'); | |
console.log(xi1 === xi2); //outputs false |
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
class MinifiedLambdaBehavior | |
static Runnable makeI() { return () -> {}; } | |
static Runnable makeII(String s) { return () -> s.equals(""); } | |
static Runnable makeIII() { return new Runnable() { public void run() {} }; } | |
@Test | |
public void thing() { | |
Set<Runnable> runnables = new HashSet<>(); |
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
public class LambdaBehavior { | |
interface Mixin { | |
Map<Mixin, String> backingMap = Collections.synchronizedMap(new WeakHashMap<>()); | |
default String getName() { return backingMap.get(this); } | |
default void setName(String name) { backingMap.put(this, name); } | |
} | |
interface X extends Runnable, Mixin {} | |
static X makeI() { return () -> System.out.println("x"); } |
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
#include <vector> | |
#include <SFML/Graphics.hpp> | |
#include <math.h> | |
int main() | |
{ | |
int resx = 1200; | |
int resy = resx * 16 / 25; | |
const int box_count_x = 25; |