Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.

fj
Class Effect.Projection

java.lang.Object
  extended by fj.Effect.Projection
Enclosing interface:
Effect<A>

public static final class Effect.Projection
extends Object

A projection of an effect. The methods defined on a projection may belong on an effect, however, this would disallow the use of Effect to be used with Java 7 closure syntax.


Method Summary
static
<A,B> Effect<B>
comap(Effect<A> e, F<B,A> f)
          A contra-variant functor on effect.
static
<A> F<A,Unit>
e(Effect<A> e)
          Returns a function for the given effect.
static
<A> Effect<A>
f(F<A,Unit> f)
          Returns an effect for the given function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

f

public static <A> Effect<A> f(F<A,Unit> f)
Returns an effect for the given function.

Parameters:
f - The function to produce the effort with.
Returns:
The effect using the given function.

e

public static <A> F<A,Unit> e(Effect<A> e)
Returns a function for the given effect.

Parameters:
e - The effect to produce the function with.
Returns:
The function using the given effect.

comap

public static <A,B> Effect<B> comap(Effect<A> e,
                                    F<B,A> f)
A contra-variant functor on effect.

Parameters:
e - The effect to map over.
f - The function to map over the effect.
Returns:
An effect after a contra-variant map.

Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.