001 package fj.data; 002 003 import fj.P1; 004 005 /** 006 * The constant arrow, for attaching a new name to an existing type. For every pair of types A and B, this type 007 * is the identity morphism from B to B. 008 */ 009 public class $<A, B> extends P1<B> { 010 011 private final B b; 012 013 private $(final B b) { 014 this.b = b; 015 } 016 017 public static <A, B> $<A, B> _(final B b) { 018 return new $<A, B>(b); 019 } 020 021 public B _1() { 022 return b; 023 } 024 }