Ben Chuanlong Du's Blog

It is never too late to learn.

Function Programming in Python

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. The built-in function map applies a function to each element of an iterable. map is not useful mostly of time as Python has list comprehension, etc. map support iterating multiple iterables …

Java Features

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. String in Switch

Java 7 allows use of strings in switch instead of just integers, which make things much more convenient (see the following example).

public void foo(Foo t) {
    String …

Template Meta Programming

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Illustrative examples for the following discussions can be found here.

  1. Do not use templated generic function/method unless necessary. Templated generic function are more useful generally speaking. However, templated function/method …