God Must Be Crazy
  • Member for 8 months
  • Last seen more than a month ago
Stats
263
reputation
4k
reached
0
answers
1
question
Loading…
About

Disclaimer:

Any contents (excluding intellectual properties from third parties) I posted in StackOverflow and StackExchange sites can be claimed as yours without prior written permission from me. No attributions are needed. This statement never expires.

The contents of my profile page has been wiped completely by someone who considered my page is irrelevant or unnecessary. Scientific facts that I have gathered for decades gone forever. Our next generation will be hard to rediscover or reinvent them.

By the way, my blood type is Microsoft .Net and I love typing semicolons. I am just a single point on the complex plane. I am not the strongest and smartest species in this universe. I love mathematics, physics, and programming. I am the only one who knows the last digit of π. I am a sort of person who don't want to be bothered with reading lengthy documentations even for things that potentially cause catastrophic effects. I considered it as my learning style. I can tell you more but then I have to kill you.

  • Euler's identity is often cited as an example of deep mathematical beauty. It links five fundamental mathematical constants: 0, 1, π, e, and i.

  • C++ can also be cited as an example of deep programming beauty. It can link all four types of brackets: [],<>,(), and {}.

    auto foo = []<typename T>(T a, T b) { return a + b; };
    

TypeScript:

let foo = (x: number) => (y: number) => x * y;
console.log(foo(2)(3));

C#:

Func<int, Func<int, int>> foo = (x) => (y) => x * y;
Console.WriteLine(foo(2)(3));

C++:

auto foo = [](int x)
{
    return [=](int y)
    {
        return x * y;
    };
};
cout << foo(2)(3) << endl;

Java:

Function<Integer, Function<Integer, Integer>> foo = (x) -> (y) -> x * y;
System.out.println(foo.apply(2).apply(3));

Python:

foo = lambda x: lambda y: x * y
print(foo(2)(3))

Clipboard:

namespace Temporary {
  type Foo<T> = (x: T, y: T) => T;
  interface Goo<T> {
    (x: T, y: T): T;
  }
  interface Hoo<T> {
    prop: (x: T, y: T) => T;
  }
  let f: Foo<number> = (x: number, y: number): number => x * y;
  let g: Goo<number> = (x: number, y: number): number => x + y;
  let h: Hoo<number> = { prop: (x: number, y: number): number => x / y };
  
  console.log(f(2, 3));
  console.log(g(2, 3));
  console.log(h.prop(2, 3));
}
Badges
This user doesn’t have any gold badges yet.
1
silver badge
6
bronze badges
Top tags
0
Score
1
Posts
100
Posts %