Comments (1)
import java.math.BigInteger;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.IntFunction;
import java.util.function.BiConsumer;
interface Selfie<Self extends Selfie<Self>> {
}
class OO<_1, _2> {
_1 _1;
_2 _2;
public OO(_1 _1, _2 _2) {
this._1 = _1;
this._2 = _2;
}
}
class OI<_1> {
_1 _1;
int _2;
public OI(_1 _1, int _2) {
this._1 = _1;
this._2 = _2;
}
}
class OOs<_1, _2> extends ArrayList<OO<_1, _2>> implements Selfie<OOs<_1, _2>> {
private static final long serialVersionUID = 1L;
private List<BiConsumer<_1, _2>> tests = new ArrayList<>();
public OOs(BiConsumer<_1, _2> f) {
tests.add(f);
}
OOs<_1, _2> against(_1 _1, _2 _2) {
add(new OO<>(_1, _2));
return this;
}
OOs<_1, _2> and(_1 _1, _2 _2) {
return against(_1, _2);
}
public OOs<_1, _2> go() {
return this;
}
public OOs<_1, _2> to(BiConsumer<A, B> f) {
return this;
}
}
class OIs<_1, _2> extends ArrayList<OI<_1>> {
/**
*
*/
private static final long serialVersionUID = 1L;
OIs<_1, _2> $(_1 _1, int _2) {
add(new OI<>(_1, _2));
return this;
}
public OIs<_1, _2> to(BiConsumer<A, B> f, BiConsumer<A, B>... fs) {
// TODO Auto-generated method stub
return this;
}
}
class A {
}
class B {
}
class Main {
public static void testFib(Integer n, BigInteger b) {
assert fib(n).equals(b);
}
public static BigInteger fib(Integer n) {
if (n == null)
return BigInteger.ZERO;
return fib1(n.intValue());
}
public static BigInteger sqrt(Integer n) {
if (n == null)
return BigInteger.ZERO;
return fib1(n.intValue());
}
public static BigInteger fib1(int n) {
if (n <= 1)
return BigInteger.ZERO;
else
return fib1(n - 1).add(fib1(n - 2));
}
static int inc(int a) {
return a + 1;
}
public static void main(String[] args) {
Tuples.to(Main::testFib).against(12, BigInteger.ZERO).and(3, BigInteger.valueOf(3))
.and(4, BigInteger.valueOf(4)).go();
Tuples.to(Main::inc).of(0, 1).of(1, 2).of(1, 2);
}
static void f(A a, B b) {
}
static void g(A a, B b) {
};
static B h(A a) {
return null;
};
}
class Tuples {
static <A, B> OOs<A, B> to(BiConsumer<A, B> f) {
return new OOs<A, B>(f);
}
static <A> Os<A> to2(Consumer<A> f) {
return new Os<A>();
}
static IIs to(IntFunction f) {
return new IIs(f);
}
}
class IIs {
private IntFunction f;
public IIs(IntFunction f) {
this.f = f;
}
public IIs of(int a, int b) {
return this;
}
}
class Os<O> {
}
class MapTest {
static {
Tuples.to2(MapTest::MapTest);
}
private Map<String, String> map;
MapTest(Map<String, String> map) {
this.map = map;
}
}
`
from main.
Related Issues (20)
- Correction of Ternarization.md HOT 3
- "Remove redundant curly braces" tipper not in preferences menu HOT 4
- latest version on eclipse marketplace
- is spartan dead? R.I.P.
- Bug with "Inline Next Increment"
- Any Number Of Parameters
- foo
- foo
- foo HOT 1
- foo HOT 1
- foo
- foo
- foo HOT 1
- foo HOT 1
- foo
- foo
- A'meer A'mer: introduction_
- Tutorial III: A presentable GitHub profile
- Migrate LGTM.com installation from OAuth to GitHub App
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from main.