--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/OE1TD-rVd9kJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
The missing code is the enclosing flatMap around the map.
Mike
Mike--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/Q8KgJ6WGGicJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Mike
Creates a new Future by applying a function to the successful result of this Future, and returns the result of the function as the new Future. If this Future is completed with an exception then the new Future will also contain this exception. Example:
val future1 = for {
  a: Int    <- actor ? "Hello" // returns 5
  b: String <- actor ? a       // returns "10"
  c: String <- actor ? 7       // returns "14"
} yield b + "-" + c
I don't understand what you mean.
Mike
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+unsubscribe@googlegroups.com.
Mike
So what does this mean for the Java issue I raised?
Mike
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Mike
You see the code. What needs to change?
Mike
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
I think the code I showed fully specifies the types of all parameters. Anyone else know what Viktor might mean?
Mike--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/NWYXXlCQv6kJ.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
A non-complete snippet is really hard to parse when you have issues
with generics. I am assuming from the compiler error that fla is a
Future<Integer>, right? If that is the case, then Mapper's first type
parameter must be Integer or a superclass and the API is correct.
If that is not the case, please clarify.
Regards,
Michael Nascimento Santos
http://threeten.sf.net/
2012/3/6 √iktor Ҡlang <viktor...@gmail.com>:
>
>
> On Tue, Mar 6, 2012 at 11:29 PM, Mike Slinn <msl...@gmail.com> wrote:
>>
>> You see the code. What needs to change?
>
>
> The call to flatMap needs to provide a type for type parameter A (probably,
> it's late and I'm just wrapping up my travel plans)
>
>>
>>
>>
>> Mike
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Akka User List" group.
>> To post to this group, send email to akka...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> akka-user+...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/akka-user?hl=en.
>>
>
>
>
> --
> Viktor Klang
>
> Akka Tech Lead
> Typesafe - The software stack for applications that scale
>
> Twitter: @viktorklang
>
> --
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to
> akka-user+...@googlegroups.com.
Here's a direct translation from Scala to Java:
    final int a = 1;
    final int b = 2;
    final int c = 3;
    final int d = 4;
    final int e = 5;
    final int f = 6;
    Future<Integer> future4 = Futures.future(new ExpCalc(a, b), dispatcher).flatMap(new Mapper<Integer, Future<Integer>>() {
      public Future<Integer> apply(final Integer x) {
        return Futures.future(new ExpCalc(c, d), dispatcher).flatMap(new Mapper<Integer, Future<Integer>>() {
          public Future<Integer> apply(final Integer y) {
            return Futures.future(new ExpCalc(e, f), dispatcher).map(new Mapper<Integer, Integer>() {
              public Integer apply(final Integer z) {
                return x + y + z;
              }
            });
          }
        });
      }
    });
Holy crap. That is ugly. Obfuscation build in - a feature.
> --
> You received this message because you are subscribed to the Google Groups "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
>
-- 
Jonas Bonér
CTO
Typesafe - The software stack for applications that scale
Phone: +46 733 777 123
Twitter: @jboner
Great
--
Jonas Bonér
CTO 
Typesafe - The software stack for applications that scale 
Phone: +46 733 777 123
Twitter: @jboner
Blog: letitcrash.com
--