TreeTransformScopeInstance
Type members
Inherited classlikes
append cps tree, which is frs and then snd. we use this representation instead Mapped/Flatmapped in cases, where we later can apply await to append term and simplify tree instead wrapping awaited tree in extra flatMap
append cps tree, which is frs and then snd. we use this representation instead Mapped/Flatmapped in cases, where we later can apply await to append term and simplify tree instead wrapping awaited tree in extra flatMap
- Inherited from
- CpsTreeScope
- Inherited from
- ApplyArgRecordScope
- Inherited from
- ApplyArgRecordScope
- Inherited from
- CpsTreeScope
- Inherited from
- ApplyArgBuilderScope
when we have swhifted function, which should return F[A] but we want to have in F[A] methods with special meaning, which should be performed on F[_] before jumping into monad (exampe: Iterable.withFilter) we will catch in ApplyTree such methods and substitute to appropriative calls of shifted.
when we have swhifted function, which should return F[A] but we want to have in F[A] methods with special meaning, which should be performed on F[_] before jumping into monad (exampe: Iterable.withFilter) we will catch in ApplyTree such methods and substitute to appropriative calls of shifted.
- Inherited from
- CpsTreeScope
- Inherited from
- InlinedTreeTransform
- Inherited from
- InlinedTreeTransform
represent select expression, which can be in monad or outside monad.
represent select expression, which can be in monad or outside monad.
constructor is not devoted to used directly: use SelectTypeApplyCpsTree.create instead. selects is reversed (i.e. external added to head)
- Inherited from
- CpsTreeScope
- Inherited from
- CpsTreeScope
Value members
Inherited methods
- Inherited from
- ApplyTreeTransform
- Inherited from
- ApplyTreeTransform
How to handle arguments? We want keep evaluation order from left to right, so, imagine we have function f(a1,a2,a3) and a2 is async, a1, a3 - sync. we will transform this to
How to handle arguments? We want keep evaluation order from left to right, so, imagine we have function f(a1,a2,a3) and a2 is async, a1, a3 - sync. we will transform this to
{ val arg1 = a1;
transform(a2).flatMap( x =>
{ val arg2 = x;
val arg3 = a3;
f(arg1, arg2, arg3)
} }
more generally we at first generate block: { arg1 = a1; ..... argN = aN; f(arg1,...argN) } and then transform one, knowing that all arguments to f are sync (of course, if all arguments are sync, we just call f(arg1,... arg2) without all this machinery)
- Value Params
- applyTerm
= Apply(fun, args) - origin apply
- args
- first argument list
- fun
- function to apply (with type-paerameters)
- tails
- next argument lists if any
- unpure
- if true, that this is call from shifted substitution, which is already return F[_] by design.
- Inherited from
- ApplyTreeTransform
- Inherited from
- ApplyTreeTransform
- Inherited from
- ApplyTreeTransform
- Inherited from
- ApplyTreeTransform
- Inherited from
- ApplyTreeTransform
applyTerm = Apply(fun, args) fun = TypeApply(obj,targs)
applyTerm = Apply(fun, args) fun = TypeApply(obj,targs)
- Inherited from
- ApplyTreeTransform
case Apply(fun,args) transform application
case Apply(fun,args) transform application
tails -- list of prepared sequence of curried arguments.
- Inherited from
- ApplyTreeTransform
- Inherited from
- ApplyTreeTransform
- Inherited from
- ApplyTreeTransform
- Inherited from
- LambdaTreeTransform