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

September 2025

S M T W T F S
 1 23456
78910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 6th, 2025 03:43 am
Powered by Dreamwidth Studios