Sep. 17th, 2008

juan_gandhi: (Default)
All details are here

Categorical approach does change programming style... Everything's lazy here.


  public static <X, Y> Map<X, Y> Map(final Set<Pair<X, Y>> pairs) {
    final Function<Pair<X, Y>, Map.Entry<X, Y>> idmap = Function.id();

    return new AbstractMap<X, Y>() {
      public Set<Entry<X, Y>> entrySet() {
        return idmap.map(pairs);
      }
    };
  }


where
Read more... )

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

October 2025

S M T W T F S
    1 23 4
5 678 9 1011
12 13 1415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 15th, 2025 04:06 am
Powered by Dreamwidth Studios