|
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. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfj.F2W<A,B,C>
public final class F2W<A,B,C>
A wrapper for functions of arity 2, that decorates them with higher-order functions.
Method Summary | ||
---|---|---|
static
|
$$(F<A,F<B,C>> f)
Wraps a given function, decorating it with higher-order functions. |
|
static
|
$$(F2<A,B,C> f)
Wraps a given function, decorating it with higher-order functions. |
|
F2W<Array<A>,Array<B>,Array<C>> |
array()
Promotes this function to a function on Arrays. |
|
FW<A,F<B,C>> |
curryW()
Curries this wrapped function to a wrapped function of arity-1 that returns another wrapped function. |
|
FW<B,C> |
f(A a)
Partial application. |
|
C |
f(A a,
B b)
Function application. |
|
F2W<B,A,C> |
flip()
Flips the arguments of this function. |
|
F2W<Iterable<A>,Iterable<B>,IterableW<C>> |
iterable()
Promotes this function to a function on Iterables. |
|
F2W<List<A>,List<B>,List<C>> |
list()
Promotes this function to a function on Lists. |
|
F2W<NonEmptyList<A>,NonEmptyList<B>,NonEmptyList<C>> |
nel()
Promotes this function to a function on non-empty lists. |
|
F2W<Option<A>,Option<B>,Option<C>> |
option()
Promotes this function to a function on Options. |
|
F2W<Promise<A>,Promise<B>,Promise<C>> |
promise()
Promotes this function to a function on Promises. |
|
F2W<Set<A>,Set<B>,Set<C>> |
set(Ord<C> o)
Promotes this function to a function on Sets. |
|
F2W<Stream<A>,Stream<B>,Stream<C>> |
stream()
Promotes this function to a function on Streams. |
|
F2W<Tree<A>,Tree<B>,Tree<C>> |
tree()
Promotes this function to a function on Trees. |
|
FW<P2<A,B>,C> |
tuple()
Uncurries this function to a function on tuples. |
|
F2<A,B,C> |
unwrap()
Returns the undecorated function. |
|
F2W<Array<A>,Array<B>,Array<C>> |
zipArray()
Promotes this function to zip two arrays, applying the function lock-step over both Arrays. |
|
F2W<Iterable<A>,Iterable<B>,Iterable<C>> |
zipIterable()
Promotes this function to zip two iterables, applying the function lock-step over both iterables. |
|
F2W<List<A>,List<B>,List<C>> |
zipList()
Promotes this function to zip two lists, applying the function lock-step over both lists. |
|
F2W<NonEmptyList<A>,NonEmptyList<B>,NonEmptyList<C>> |
zipNel()
Promotes this function to zip two non-empty lists, applying the function lock-step over both lists. |
|
F2W<Set<A>,Set<B>,Set<C>> |
zipSet(Ord<C> o)
Promotes this function to zip two sets, applying the function lock-step over both sets. |
|
F2W<Stream<A>,Stream<B>,Stream<C>> |
zipStream()
Promotes this function to zip two streams, applying the function lock-step over both streams. |
|
F2W<Tree<A>,Tree<B>,Tree<C>> |
zipTree()
Promotes this function to zip two trees, applying the function lock-step over both trees. |
|
F2W<TreeZipper<A>,TreeZipper<B>,TreeZipper<C>> |
zipTreeZipper()
Promotes this function to zip two TreeZippers, applying the function lock-step over both zippers in all directions. |
|
F2W<Zipper<A>,Zipper<B>,Zipper<C>> |
zipZipper()
Promotes this function to zip two zippers, applying the function lock-step over both zippers in both directions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public F2<A,B,C> unwrap()
public C f(A a, B b)
f
in interface F2<A,B,C>
a
- The A
to transform.b
- The B
to transform.
public FW<B,C> f(A a)
f
in interface F<A,F<B,C>>
a
- The A
to which to apply this function.
public FW<A,F<B,C>> curryW()
public static <A,B,C> F2W<A,B,C> $$(F2<A,B,C> f)
f
- The function to wrap.
public static <A,B,C> F2W<A,B,C> $$(F<A,F<B,C>> f)
f
- The function to wrap.
public F2W<B,A,C> flip()
public FW<P2<A,B>,C> tuple()
public F2W<Array<A>,Array<B>,Array<C>> array()
public F2W<Promise<A>,Promise<B>,Promise<C>> promise()
public F2W<Iterable<A>,Iterable<B>,IterableW<C>> iterable()
public F2W<List<A>,List<B>,List<C>> list()
public F2W<NonEmptyList<A>,NonEmptyList<B>,NonEmptyList<C>> nel()
public F2W<Option<A>,Option<B>,Option<C>> option()
public F2W<Set<A>,Set<B>,Set<C>> set(Ord<C> o)
o
- An ordering for the result of the promoted function.
public F2W<Stream<A>,Stream<B>,Stream<C>> stream()
public F2W<Tree<A>,Tree<B>,Tree<C>> tree()
public F2W<Array<A>,Array<B>,Array<C>> zipArray()
public F2W<Iterable<A>,Iterable<B>,Iterable<C>> zipIterable()
public F2W<List<A>,List<B>,List<C>> zipList()
public F2W<Stream<A>,Stream<B>,Stream<C>> zipStream()
public F2W<NonEmptyList<A>,NonEmptyList<B>,NonEmptyList<C>> zipNel()
public F2W<Set<A>,Set<B>,Set<C>> zipSet(Ord<C> o)
o
- An ordering for the resulting set.
public F2W<Tree<A>,Tree<B>,Tree<C>> zipTree()
public F2W<Zipper<A>,Zipper<B>,Zipper<C>> zipZipper()
public F2W<TreeZipper<A>,TreeZipper<B>,TreeZipper<C>> zipTreeZipper()
|
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. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |